saving in different folders
2 ビュー (過去 30 日間)
古いコメントを表示
Hi
This is a statement in a for loop
[f_estimate(i), freqconf(i), z_estimate(i), dampconf(i)]
How do I save each of the variables in different folders?
0 件のコメント
採用された回答
Angelo Yeo
2023 年 6 月 19 日
save(fullfile(basepath, 'folder1', 'f_estimate.mat'), 'f_estimate')
save(fullfile(basepath, 'folder2', 'freqconf.mat'), 'freqconf')
% etc ...
0 件のコメント
その他の回答 (1 件)
Ayush Kashyap
2023 年 6 月 19 日
Hi Indrani,
As per my knowledge, you can utilize the "save" and "fullfile" functions provided by matlab inside your for loop as follows:
save(fullfile(<folder path>, ['f_estimate_' num2str(i) '.mat']), 'f_estimate', '-v7.3');
You can also refer to this documentation for more details: Matlab Save Function
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!