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일

40 개 추천

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

Pedro Rocha
Pedro Rocha 2020년 8월 19일
Excelent!! Tks
Salima Ljamai
Salima Ljamai 2020년 9월 17일
Thank you.
Star Strider
Star Strider 2020년 9월 18일
Thank you!
My pleasure!
Jurek
Jurek 2025년 3월 20일
Cheers person from 5 years ago

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2016년 10월 8일

댓글:

2025년 3월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by