Why does only one plot show up at once?

조회 수: 14 (최근 30일)
Jacob
Jacob 2014년 12월 4일
댓글: Fariha Tabassum 2020년 4월 11일
I am trying to plot a velocity and acceleration versus an angle in two separate graphs but when I have both plots in my code, only one graph shows up. If I delete one of the plot codes, the other one shows up just fine. Here is my code.

채택된 답변

Star Strider
Star Strider 2014년 12월 4일
You’re almost there. Instead of the comment ‘% Figure 1’, label them as such:
figure(1)
plot(theta1, PistonSpeed2)
... etc. ...
figure(2)
plot(theta1, PistonAcceleration)
... etc. ...
MATLAB will overplot in an existing figure window unless you tell it not to.
  댓글 수: 1
Fariha Tabassum
Fariha Tabassum 2020년 4월 11일
I'm calling a built in function that has incorporated the plot command. Now what can I write in my code so that I can see that graph along with my graphs?

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

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by