Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How do I create multiple x,y scatters on one plain, and show the "trajectory" of each point?

1 回表示 (過去 30 日間)
Ulrik William Nash
Ulrik William Nash 2017 年 4 月 18 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Suppose I have the following multidimensional matrix, where rows are combinations of x and y values, and the third dimension holds different samples of such combinations:
[x,y,S]
Now I wish to create S scatter plots on the same plain, and I can of course use "hold on" to achieve this as I loop through the third dimension. However, I also wish to show the evolution or trajectory of each combination by joining combinations with a line, which I don't know how to do.
How is that done?
  1 件のコメント
Walter Roberson
Walter Roberson 2017 年 4 月 24 日
Could you post a small data sample? I am confused about how your data is arranged.

回答 (1 件)

Mukul Rao
Mukul Rao 2017 年 4 月 24 日
Hello,
You could try using the animatedline command
Essentially, every time you would add data from the third dimension, you could update the line objects with new (x,y) values as explained in the documentation.
Of course, depending on your use case, you might want to avoid creating too many line objects in interest of saving memory.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by