How do you dynamically generate file names?
Mostra commenti meno recenti
Hi. I try save a graphic as a image (jpg). I've written:
%--------------------------------
m=cell(5,1)
m(1,1)={'A'}
m(2,1)={'B'}
m(3,1)={'C'}
m(4,1)={'D'}
m(5,1)={'E'}
for j=1:5
x=plot(rand(j))
saveas(gcf,'image_m(j,1).jpg')
end
%-------------------------------------
I wrote m(j,1) because I want obtain those files:
image_A.jpg
image_B.jpg
image_C.jpg
image_D.jpg
image_E.jpg
-------------------------
I wrote m(j,1), although I know that it is wrong.
Any ideas? Thanks in advance
Risposta accettata
Più risposte (1)
Categorie
Scopri di più su Printing and Saving in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!