How to save entire workspace without having to run the script every time

31 ビュー (過去 30 日間)
Saad Khan
Saad Khan 2017 年 3 月 15 日
コメント済み: Saad Khan 2017 年 4 月 3 日
Dear Community member, Im new to MATLAB and in need of your assistant. Im running different functions and variables in my script. When i run them, the variables gets saved to my workspace and I can see the value from the workspace window. My question is, how can I save the entire workspace to some sort of file so I don't have to run the entire script all the time, it takes quite some time to run them(2 hours). I'm really, like really really new to MATLAB, so a step by step guide would be much appreciated.
Thank you for taking your time reading this. Kind Regards Saad

採用された回答

Jan
Jan 2017 年 3 月 15 日
編集済み: Jan 2017 年 3 月 15 日
Simply use save.
run('YourScript');
save('C:\Temp\StoredData.mat')
Then you can load the complete workspace in the next session:
% Close Matlab, restart Matlab, then:
load('C:\Temp\StoredData.mat')
  1 件のコメント
Saad Khan
Saad Khan 2017 年 4 月 3 日
That's exactly what i was looking for thanks alot

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWorkspace 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