how to plot two m.file in one plot
Mostrar comentarios más antiguos
i have two PDE each one i calculated in m.file, but i want to draw the output of first one as x, and the second as y
how can i do that
Respuesta aceptada
Más respuestas (1)
use plot(x, y), e.g.:
x = [-5:5;2*(-5:5); 3*(-5:5)];
y = [3*x.^2+3*x-3; -5*x.^2+5*x-15; -2*x.^2-3*x-13;];
plot(x(1,:),y(1,:), 'ro-', x(2,:),y(2,:), 'kp:', x(3,:),y(3,:), 'b--', 'LineWidth', 2)
grid on
xlabel ('x')
ylabel ("y(x)")
legend('Set 1', 'Set 2', 'Set 3', 'Location', 'Best')
1 comentario
br
el 18 de Feb. de 2024
Categorías
Más información sobre General PDEs en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
