blank  

Next Post:

Multiple Selection Types In AutoCAD Drawing Scheme(Illustrated Expression)

Saving Matrices In MatLab To Computer(Illustrated Expression)

blank

Sometimes you need to save matrices in Matlab. For example you created a matrix according to datas that you are collecting in Matlab, what you need to do is save the data that you collected as a matrix file. You can load this saved matrix whenever you want into the Matlab. The extension of matrix is .mat. In this article we will show you how to save matrices that created in Matlab.

YOU CAN LEARN MatLab IN MECHANICAL BASE; Click And Start To Learn MatLab!

How To Save And Load A Matrix In Matlab?

blank
Creating a matrix in Matlab.

For example we want to save the created matrix above as “Factors” to D: directory. Type “save D:\Factors” then press enter. This matrix will be saved to D: directory with the name of “Factors”.

blank
Type save command in Matlab.

We wrote the save command for this matrix in Matlab then we pressed to Enter.

blank
Saved matrix file in Matlab.

The Factors matrix file is saved as shown by red arrow above. You can open this by typing “load D:\Factors” then press enter to load it in Matlab.

blank
Loaded matrix that saved before in Matlab.

As you can see, we typed “load D:\Factors” to command window in Matlab, then the related matrix is opened at Workspace that shown by red arrow above.

Saving and loading of a matrix in Matlab is simple like that.

  • Site Comments

At least 10 characters required.