Plot on different figures during a loop
1,785 ビュー (過去 30 日間)
I'm extracting from different files some data that have ot plot on the same plot, I use a loop like
figure, hold on
I'd like to plot t(:,1),t(:,2) on figure 1, and for example t(:,1),t(:,3) on another figure. Is it possible to do it in the same loop?
thanks for your help
the cyclist 2011 年 7 月 28 日
Yes. When you call the figure() command, call it with an input argument:
Then, before you do the particular plotting command, call figure() again, using the input argument that you want to plot to:
When the figure number already exists, it makes that figure current.
You might want to read "doc figure", "doc gcf", and "doc hold" to make sure you don't overwrite the plot that is already there in that figure.
その他の回答 (2 件)
Kehinde OROLU 2011 年 7 月 28 日
Use this instead: