Insert a string in a code to export a figure
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
This is code:
...
name='location';
options.Format = 'tiff';
hgexport(gcf, 'name.tif', options);
....
Can the 'location' be inserted to " name.tif" (replace 'name' by 'location')?
The exported filename is 'location.tif' (NOT 'name.tif').
0 件のコメント
採用された回答
Guillaume
2015 年 10 月 20 日
hgexport(gcf, sprintf('%s.tif', name), options);
%or
hgexport(gcf, [name, '.tif'], options);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
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!