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

 Accepted Answer

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

More Answers (0)

Categories

Products

Tags

Community Treasure Hunt

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

Start Hunting!