How can i plot f(i),g(i),h(i) in one figure(i)?

1 visualización (últimos 30 días)
MA
MA el 7 de Jun. de 2014
Comentada: Star Strider el 7 de Jun. de 2014
I want to plot each three diagrams in one figure

Respuesta aceptada

Star Strider
Star Strider el 7 de Jun. de 2014
Use the subplot function.
Your loop becomes:
figure(1)
for i = 1:3
subplot(3,1,i)
. . .
plot(x,f(i),'-b', ... )
. . .
end
to get 3 stacked plots in one figure. Other configurations are possible. See the documentation on subplot for details.
  6 comentarios
MA
MA el 7 de Jun. de 2014
thank you so much
Star Strider
Star Strider el 7 de Jun. de 2014
My pleasure!

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.

Community Treasure Hunt

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

Start Hunting!

Translated by