Is there a bug in quiver?

1 次查看(过去 30 天)
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 个评论
Francesco Michelotti
I have a problem too with quiver. Everything works well if you invert u and v. I'm checking right now.

请先登录,再进行评论。

回答(1 个)

the cyclist
the cyclist 2019-9-27
编辑:the cyclist 2019-9-27
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.

类别

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