saving and replacing matlab figures in a specific directory
5 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I need to save and/or replace (if already exist) matlab figures in a specific drectory, I'm using the following commands to save:
path = 'specific/directory'; name = 'figure_name'; saveas(gcf,[path,filesep,name],'png')
Is it possible to clear figures in the directory? How can I replace them?
Thanks
0 件のコメント
回答 (1 件)
Ken Atwell
2013 年 7 月 19 日
I think the path you are passing to saveas is a little messed up. The help function fullfile can help get it right:
saveas(gcf, fullfile(path, name), 'png')
参考
カテゴリ
Help Center および File Exchange で Printing and Saving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!