how to save the figure?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i have some functions then i have
if true
figure(k)
end
each iteration i got one figure. now i want to save the every figure in a new directory. please help me
0 comentarios
Respuesta aceptada
Lisa Wu
el 10 de Mayo de 2013
num_of_fig = 1;
fichier=fullfile('directory','filename') ;
if true
figure(k);
name = strcat('figure',num2str(num_of_fig ));
% save figure name as figure1,figure2,figure3
saveas(gcf,strcat(name,'jpg'));
num_of_fig = num_of_fig +1;
end
Más respuestas (2)
Azzi Abdelmalek
el 10 de Mayo de 2013
fichier=fullfile('directory','filename')
saveas(gcf,'fichier.jpg')
2 comentarios
Azzi Abdelmalek
el 10 de Mayo de 2013
for k=1:10
fichier=fullfile('directory',sprintf('filename%d',k))
saveas(gcf,'fichier.jpg')
Image Analyst
el 11 de Mayo de 2013
The usual answer is to refer to the FAQ for several code examples: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!