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

 Respuesta aceptada

Cedric
Cedric el 9 de Abr. de 2013

0 votos

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

Más respuestas (0)

Categorías

Más información sobre File Operations en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 9 de Abr. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by