Plotting within a for loop
显示 更早的评论
I would really like to use a for loop to generate and name a bunch of plots that can then be recalled later. In my iimaginary world it would look something like:
for n=1:bazillion
myplots(n)=plot(Data(:,n));
end
Then later on, I can pull up plot number one million and whatever and do whatever I like to it. Change titles, axis, put it in a presentation, etc....
so the question is: Can "plot(Data)" be saved as a variable? How is this done?
Thanks
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2014-1-16
编辑:Azzi Abdelmalek
2014-1-16
for n=1:bazillion
plot(Data(:,n));
hgsave(gcf,sprintf('figure%d.fig',n))
end
Then use hgload to get your plots
hgload('figure1.fig')
%and so on
类别
在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!