how to plot two m.file in one plot
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (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 Kommentar
br
am 18 Feb. 2024
Kategorien
Mehr zu General PDEs finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
