saving workin space variable

3 次查看(过去 30 天)
I executed my file which consists 20 variables (stored in the workspace after execution). I want to save 1 variable called myvar.mat to save into my working directory.
So I used
>>save('myvar.mat')
but it stored all the 20 variables with name myvar.mat.
To save single variable what I have to do?

采纳的回答

per isakson
per isakson 2011-11-10
Doc says:
save(filename, variables)
try
save('myfile.mat', 'myvar' )

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by