Saving workspace variables iteratively

2 ビュー (過去 30 日間)
Jeff
Jeff 2017 年 12 月 9 日
回答済み: Matt J 2017 年 12 月 9 日
I would like to iteratively save my workspace variables to disk upon completion of a FOR loop. For example, for the 1st iteration I would save to output1.mat & the 2nd would be output2.mat. Unfortunately, the HELP for the SAVE command does not provide any option on how to change the filename iteratively as I am proposing.
Does anyone have any suggestions on how to do this? My m-file is attached. Line 63 is where I save the workspace variables.

採用された回答

Matt J
Matt J 2017 年 12 月 9 日
for i=1:N
save(['output' num2str(i)])
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by