Why does only one plot show up at once?

18 visualizaciones (últimos 30 días)
Jacob
Jacob el 4 de Dic. de 2014
Comentada: Fariha Tabassum el 11 de Abr. de 2020
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.

Respuesta aceptada

Star Strider
Star Strider el 4 de Dic. de 2014
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 comentario
Fariha Tabassum
Fariha Tabassum el 11 de Abr. de 2020
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?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by