Multiple Plot and saving as jpg
5 次查看(过去 30 天)
显示 更早的评论
I want to have multiple plots and wants to save as jpg file separately as (i.e. 1.jpg ,2.jpg....)
回答(1 个)
dbmn
2016-7-28
Hi,
here's a piece of code that should get you started.
Best
Michael
clear all; close all; clc;
% Create the Figures (this part you already have in your code somewhere)
for i=1:1:3
figure
h(i) = plot(rand(10,1));
end
% Save the Figures as jpeg using the Graphics handle h(i)
for i=1:1:numel(h)
saveas(h(i),sprintf('%d.jpg', i))
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!