set figure title in a loop

6 ビュー (過去 30 日間)
zilai si
zilai si 2019 年 5 月 14 日
回答済み: madhan ravi 2019 年 5 月 14 日
Hello everyone, I want to save figure in a loop like this:
for N = 1:10
saveas( gcf, 'TruncatedPowerFunc_N','epsc');
but the title is always 'TruncatedPowerFunc_N', I want the title to change with N in every iteration like:
TruncatedPowerFunc_1 TruncatedPowerFunc_2 TruncatedPowerFunc_3 ......

採用された回答

madhan ravi
madhan ravi 2019 年 5 月 14 日
saveas( gcf, sprintf('TruncatedPowerFunc_%d',N),'epsc');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by