how to define a path in saveas command
古いコメントを表示
I am using saveas command in a ''for loop'' to save 20 plots in .png format. How can I add the i counter of for loop in saveas command. Many thanks
pathdatasave = 'E:\matlab';
saveas(gcf,[pathdatasave '%03d' '.png' ]);
採用された回答
その他の回答 (1 件)
Tommy
2020 年 6 月 18 日
Possibly like this?
pathdatasave = 'E:\matlab';
saveas(gcf,sprintf('%s%03d.png', pathdatasave, i));
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!