saving all of workspace in a specified folder

37 次查看(过去 30 天)
saving all of workspace in a specified folder and after saving, how it can be import to MATLAB (load) from that specified folder?

采纳的回答

TAB
TAB 2011-9-17
Saving to path
save('path\myfile.mat');
Example: save('D:\WORKING\Myfile.mat');
Loading from a path
load('path\myfile.mat');
Example: load('D:\WORKING\Myfile.mat');
  6 个评论
Emma_Mc
Emma_Mc 2016-3-3
Include the location in the string for your variable name.
For example, you want to save a and b to the mat file 'variable_a_1_variable_b_2' in a folder 'save_test'.
a=1;
b=2;
variable_name=['D:\save_here\variable_a_',num2str(a),'variable_b_',num2str(b),'.mat'];
save(variable_name,'a','b');

请先登录,再进行评论。

更多回答(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