how to save plots so that they are in the same graph for different conditions

1 回表示 (過去 30 日間)
Priya
Priya 2014 年 7 月 25 日
コメント済み: Priya 2014 年 8 月 25 日
Hi,
I need to generate plots for four different conditions. So I will be having four curves on the whole. Now I get a plot for the first condition, and when I change the condition, I obviously get a different plot but I need to make the first plot remain in the same graph. Similarly for the third and fourth graphs (or conditions).
Please someone tell me how to do this. I have tried the 'hold on' command, nothing happens.
Thanks.

採用された回答

Star Strider
Star Strider 2014 年 7 月 25 日
編集済み: Star Strider 2014 年 7 月 25 日
See the documentation on subplot. It will give you as many plots as you want in the same figure.
If you want them all in the same set of axes, and hold did not work, post your code so we can see what you did and what the problem is.
Later, with posted code available...
One problem is that you’re not telling it to plot the correct vector. See if changing the plot command to:
plot(s_x_index, f_x_save, 'x')
improves things.
  34 件のコメント
Star Strider
Star Strider 2014 年 8 月 25 日
I would like to, but I haven’t used Simulink in a while. It would take me at least several days if not weeks to become proficient enough in it again to be able to solve problems regarding Simulink programming. Be sure to put Simulink in the ‘Products’ tag window so that people proficient in Simulink will see it.
Priya
Priya 2014 年 8 月 25 日
Thanks, but I'm not able to upload .slx file.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by