フィルターのクリア

Is there a bug in quiver?

1 回表示 (過去 30 日間)
Manuel Cornejo Muñoz
Manuel Cornejo Muñoz 2019 年 9 月 27 日
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
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
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.
  1 件のコメント
Manuel Cornejo Muñoz
Manuel Cornejo Muñoz 2019 年 10 月 1 日
I am a beginner. Thank you very much

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by