saving workspace variables individually?
2 ビュー (過去 30 日間)
古いコメントを表示
Hello
Is there a way to save the variables in the workspace separately?
Say the workspace contains 50 variables (all arrays of double) , is there a way to save those 50 variables separately instead of saving them in one mat file?
0 件のコメント
採用された回答
Les Beckham
2023 年 3 月 27 日
a = 1;
b = 2;
c = 3;
vars = who
for v = 1:numel(vars)
save(sprintf('%s.mat', vars{v}), vars{v})
end
dir
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!