How to plot separate graphs?

195 ビュー (過去 30 日間)
Jimmy W
Jimmy W 2016 年 10 月 8 日
コメント済み: Jurek 2025 年 3 月 20 日
I have plotted a few graphs in different sections of my scripts, however when I run the m-file it will only show the last graph, I have to run it section by section in order to get all the graphs. How can I get all the graphs after I hit the run button? p.s. I am new to matlab so please explain with simple language, thank you for the help!

採用された回答

Star Strider
Star Strider 2016 年 10 月 8 日
Specify each plot as a separate figure. I number mine, but that’s not absolutely necessary. See the documentation for the figure function for details.
Example:
figure(1)
plot(a,b)
grid
figure(2)
plot(c,d)
grid
  4 件のコメント
Star Strider
Star Strider 2020 年 9 月 18 日
Thank you!
My pleasure!
Jurek
Jurek 2025 年 3 月 20 日
Cheers person from 5 years ago

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

その他の回答 (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