필터 지우기
필터 지우기

How can I update data for quiver plot?

조회 수: 8 (최근 30일)
Philipp
Philipp 2012년 11월 15일
Hello,
I'm trying update a quiver plot with "linkdata on" - is that possible?
When it is not, what else can I do?
My goal is to show a time varying vectorfield.
Thank you for any suggestions.
Philipp

채택된 답변

Grzegorz Knor
Grzegorz Knor 2012년 11월 15일
I think that this is impossible for quiver plot.
Try this code:
[X,Y] = meshgrid(-2:.2:2);
Z = X.*exp(-X.^2 - Y.^2);
[DX,DY] = gradient(Z,.2,.2);
h = quiver(X,Y,DX,DY);
xlim([-2.5 2.5])
for t=1:-0.1:-1
Z = X.*exp((-X.^2 - Y.^2)*t);
[DX,DY] = gradient(Z,.2,.2);
set(h,'udata',DX,'vdata',DY)
pause(0.1)
end
  댓글 수: 1
Philipp
Philipp 2012년 11월 15일
Thanks a lot.
The properties you were using, are new to me.
It works perfectly.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by