Save Image Files in a loop
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Maria Jaramillo
il 28 Giu 2018
Risposto: D. Plotnick
il 28 Giu 2018
Hello,
I have a program that generates certain images and saves them at the end and I have to actually hit save at the end, I am trying to make a loop for the same program, that will override the value of the parameter and save each file every time. I tried a simple for loop but it only saves the file once. when it goes through the first value of the parameter.
0 Commenti
Risposta accettata
D. Plotnick
il 28 Giu 2018
Something like this should work: just iterate over the save-name for the image.
for i = 1:I
image = doStuff(data);
imagesc(image);
fName = ['fileNameBase_',num2str(i),'.png'];
saveas(gca,fName);
end
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Convert Image Type in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!