How to increment string

15 views (last 30 days)
Rohan Repale
Rohan Repale on 9 Apr 2013
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

Accepted Answer

Cedric
Cedric on 9 Apr 2013
fname = sprintf('filename(%d).jpg', m) ;
saveas(C, fname) ;

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!