Azzera filtri
Azzera filtri

Is there a bug in quiver?

1 visualizzazione (ultimi 30 giorni)
Manuel Cornejo Muñoz
Manuel Cornejo Muñoz il 27 Set 2019
Dear Sirs
It seems to me that the plot should be wrong because there are two rows of vectors pointing down, when everithing is positive. Is there a bug in the quiver plot function?
Sincerely
Manuel Cornejo
quiver.jpg
  1 Commento
Francesco Michelotti
Francesco Michelotti il 5 Ott 2019
I have a problem too with quiver. Everything works well if you invert u and v. I'm checking right now.

Accedi per commentare.

Risposte (1)

the cyclist
the cyclist il 27 Set 2019
Modificato: the cyclist il 27 Set 2019
It seems to me the problem is that you used matrix operations when you intended array operations. Try this instead:
u = y./sqrt(x.^2+y.^2);
v = x./sqrt(x.^2+y.^2);
test.png
See this documentation for details.

Categorie

Scopri di più su Vector Fields in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by