set figure title in a loop

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by