Let me try to put it this way:
I have 50,000 particles in a 2-D box. After I do my simulation, I get that some of the particles swirl around each other and kind of form a vortex type structure.
So now I have 50,000 x-cordinate(x), y-cordinate(y) and 50,000 value of x-velocity(vx) and y-velocity(vy).
What I want is to plot this data in such a way that it should show the vortex with arrows representing the direction of velocity.
Also it should have a colorbar.
One of my friend said that it can be plotted using pcolor and the arrows can be shown using quiver plot.
I need high quality image
Can anyone help, thank you!

6 件のコメント

Image Analyst
Image Analyst 2021 年 11 月 25 日
Probably but you forgot to attach your data so no one can try anything for you.
Adam Danz
Adam Danz 2021 年 11 月 26 日
Alakesh Upadhyaya
Alakesh Upadhyaya 2021 年 11 月 29 日
The data is too big but here I will attach a mat.file, the 3rd and 4th coulumn are x and y positions and 5th and 6th coloumn are x and y component of velocity.
KSSV
KSSV 2021 年 11 月 29 日
編集済み: KSSV 2021 年 11 月 29 日
Unable to load the file.
Have a look on this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/3225-quiverc
Alakesh Upadhyaya
Alakesh Upadhyaya 2021 年 11 月 30 日
編集済み: Alakesh Upadhyaya 2021 年 11 月 30 日
let's just say I ahve 50000 partcles in a 100 x 100 box,
box=100;
x=box*randn(50000,1); x-positions
y=box*randn(50000,1); y-positions
vx=randn(50000,1); x-velocity
vy=randn(50000,1); y-velocity
how do I pcolor plot these with arrows showing the direction of the particles
Walter Roberson
Walter Roberson 2021 年 11 月 30 日
The file turns out to be a text file that has been named with the .mat extension.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeVector Fields についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by