Is there a bug in quiver?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/240127/quiver.jpeg)
1 Kommentar
Francesco Michelotti
am 5 Okt. 2019
I have a problem too with quiver. Everything works well if you invert u and v. I'm checking right now.
Antworten (1)
the cyclist
am 27 Sep. 2019
Bearbeitet: the cyclist
am 27 Sep. 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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/240135/test.png)
Siehe auch
Kategorien
Mehr zu Vector Fields finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!