Animated Quiver Vector Plot

17 ビュー (過去 30 日間)
Artele
Artele 2020 年 3 月 17 日
コメント済み: Amit Kumar 2021 年 6 月 12 日
Hi, I was wondering, how can I plot my quiver plot as a "animated" vector plot showing each value step by step?
I have all my matrices 24x6
I have tried:
for i = 1:23, i = i+1
for j = 1:5, j = j+1
quiver(xx(i,j),yOBS(i,j),AY(i,j),AX(i,j));
end
end
unfortunately it deletes the previous value while the new one is plotted, I would appreciate advices/help

採用された回答

Akira Agata
Akira Agata 2020 年 3 月 17 日
How about using a graphic handle?
Here is an example:
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
figure
h = quiver(x,y,u,v);
N = 100;
phi = linspace(0, 2*pi, N);
for kk = 1:N
u = cos(x+phi(kk)).*y;
v = sin(x+phi(kk)).*y;
h.UData = u;
h.VData = v;
pause(0.05)
end
  1 件のコメント
Amit Kumar
Amit Kumar 2021 年 6 月 12 日
Hi,
I just wanted to know, can we make this plot translational along x-axis? I have tried various ways but it isn't working.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by