how to save the figure?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Lisa Wu
2013-5-10
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
更多回答(2 个)
Azzi Abdelmalek
2013-5-10
fichier=fullfile('directory','filename')
saveas(gcf,'fichier.jpg')
2 个评论
Azzi Abdelmalek
2013-5-10
for k=1:10
fichier=fullfile('directory',sprintf('filename%d',k))
saveas(gcf,'fichier.jpg')
Image Analyst
2013-5-11
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!