How can I update data for quiver plot?

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

 Respuesta aceptada

Grzegorz Knor
Grzegorz Knor el 15 de Nov. de 2012
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 comentario

Philipp
Philipp el 15 de Nov. de 2012
Thanks a lot.
The properties you were using, are new to me.
It works perfectly.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Vector Fields en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 15 de Nov. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by