How to plot multiple lines in a graph?
1.471 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a matrix with several 5 layers. I want to plot the numbers at a specific gridpoint for layers 2,3, and 4. How would I go about doing this?
Thanks for the help!
1 comentario
Respuestas (3)
Muhammad Usman Saleem
el 24 de Jun. de 2016
x1=[2 3 4 5];
y1=[9 4 3 2];
x2=[11 20 30 50 ];
y2= [ 20 30 50 60];
plot(x1,y1)
hold on
plot(x2,y2)
hold off
This plot two line graphs on same plot
0 comentarios
Mpilo Hlwathika
el 12 de Jun. de 2023
x1=[2 3 4 5];
y1=[9 4 3 2];
x2=[11 20 30 50 ];
y2= [ 20 30 50 60];
plot(x1,y1)
hold on
plot(x2,y2)
hold off
0 comentarios
MathWorks Support Team
el 22 de Mayo de 2019
Please see the following post, which has a good accepted answer to a similar question:
0 comentarios
Ver también
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!