i have a loop that generates an image everytime how can I save the figures?
1 visualización (últimos 30 días)
Hi, my code is the following but its saving each image with the same name I want the name to change, How could I do it?
AllFigH = findall(groot, 'type','figure')
for iFig = 1:numel(AllFigH)
fig = AllFigH(iFig);
Folder = ('C:\Users\vicen\Desktop\TFG Vicenç\Imagenes\Imagenes Geoscatter\DIA 1');
FileName = sprintf('%03d.png',iFig); % <-----
Benjamin Kraus el 31 de Dic. de 2021
Editada: Image Analyst el 31 de Dic. de 2021
I can't see any obvious bugs in your code. As written, it should save a copy of all figures that you opened in your loop. Are you sure you have more than one open figure? That's the only reason I can think you would only get one file.