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

1 个评论
Francesco Michelotti
2019-10-5
I have a problem too with quiver. Everything works well if you invert u and v. I'm checking right now.
回答(1 个)
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);

另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Vector Fields 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!