フィルターのクリア

plotting the trajectories of three particles in same graph

3 ビュー (過去 30 日間)
Ls
Ls 2021 年 8 月 10 日
コメント済み: Image Analyst 2021 年 8 月 10 日
I have three particles with x and y values of each particle, I neet to plot all three trajectories in same graph. How can I do it?

採用された回答

Image Analyst
Image Analyst 2021 年 8 月 10 日
Try this:
plot(x1, y1, 'r-', 'LineWidth', 3);
hold on;
plot(x2, y2, 'g-', 'LineWidth', 3);
plot(x3, y3, 'b-', 'LineWidth', 3);
grid on;
xlabel('x', 'FontSize', fontSize);
ylabel('y', 'FontSize', fontSize);
title('Demo by Image Analyst', 'FontSize', fontSize);
legend('y1', 'y2', 'y3');
  4 件のコメント
Ls
Ls 2021 年 8 月 10 日
Its variable t and with respect to t there is variable x and y for each three particle.
Image Analyst
Image Analyst 2021 年 8 月 10 日
If x and y are parameterized variables depending on t, then the first code snippet I sent you will work.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by