Why does only one plot show up at once?

9 次查看(过去 30 天)
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