For example you want to save a and b to the mat file variable a 1 variable b 2 in a folder save test.
Save mat file to specific folder.
Select the mat file you want to load and click open.
If filename has no extension that is no period followed by text and the value of format is not specified then matlab appends mat if filename does not include a full path matlab saves to the current folder.
To load a subset of variables from a mat file on the home tab in the variable section click import data.
I have a script that i use on many different files saved in different folders.
Follow the instructions in the faq it covers changing mat filenames in a loop.
To save the variables x and y to a file called myfile mat in a folder called myfolder try this.
If filename has no extension that is no period followed by text and the value of format is not specified then matlab appends mat if filename does not include a full path matlab saves to the current folder.
It s also good to use fullfile in addition to sprintf to build the complete filename as the second faq example shows.
If you do not specify filename the save function saves to a file named matlab mat.
To load saved variables from a mat file into your workspace double click the mat file in the current folder browser.
You also can drag the desired variables from the current folder.
Name of file specified as a character vector or string scalar.
All of the files i want to keep separate i keep in different folders.
Name of file specified as a character vector or string scalar.
Mat files are not the same as material files which are rigs of rods texture reference files used with the rigs of rods 3d simulator game.
I use the save and saveas functions in my script to keep my results.
One thing i don t figure out is that the way to save mat file into a different folder from the m that converts files.
If you do not specify filename the save function saves to a file named matlab mat.