how to plot two m.file in one plot
古いコメントを表示
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
採用された回答
その他の回答 (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')
カテゴリ
ヘルプ センター および File Exchange で General PDEs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
