How to plot multiple curves on the same graph
    21 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Darshan
 el 8 de Jul. de 2022
  
    
    
    
    
    Respondida: Keshav
      
 el 8 de Jul. de 2022
            x = [1 2 3 4 5];
y = [7 8 9 10 11];
plot(x,y)
plot(y,x)
I want to plot these two curve on a single plot. can you please tell me how to do that?
0 comentarios
Respuesta aceptada
  Keshav
      
 el 8 de Jul. de 2022
        Hi, you can use the hold on function to plot both line on same graph. you can refer to the below code.
x = [1 2 3 4 5];
y = [7 8 9 10 11];
plot(x,y)
hold on
plot(y,x)
hold off
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


