How to increment string

I wish to do something like this...
for m=1:10,
C=%some array
C=imagesc(A);figure(gcf);
saveas(C,'filename(m).jpg');
end
Can someone help me??
Thanks, Rohan

 采纳的回答

fname = sprintf('filename(%d).jpg', m) ;
saveas(C, fname) ;

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 File Operations 的更多信息

产品

标签

Community Treasure Hunt

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

Start Hunting!

Translated by