フィルターのクリア

How can I extract orientation of arrows from quiver function?

1 回表示 (過去 30 日間)
annalisa08
annalisa08 2015 年 3 月 9 日
コメント済み: Michael Haderlein 2015 年 3 月 10 日
In quiver function where is the information about the arrow orientation?

回答 (2 件)

Sean de Wolski
Sean de Wolski 2015 年 3 月 10 日
編集済み: Sean de Wolski 2015 年 3 月 10 日
You'll need to use atan2 to get the orientation from u, v
q = quiver(1,1,1,0.5)
r = atan2(q.VData,q.UData)
r*180/pi to get it into degrees

Michael Haderlein
Michael Haderlein 2015 年 3 月 9 日
quiver actually plots the information.
quiver(x,y,u,v)
means arrows are drawn pointing in (u/v) direction and positioned at (x/y). So, if you have x=0, y=0, u=1, v=1, you get one arrow pointing top right. For multiple arrows, x, y, u and v have multiple values.
  5 件のコメント
annalisa08
annalisa08 2015 年 3 月 10 日
In this way is correct, but my vectors from quiver function start from different origins: x = [-15 0 15;-15 0 15;-15 0 15]; y = [8 8 8; 13 13 13; 18 18 18];u = rand(3,3); v = rand(3,3)
is it possible aligning the vectors in quiver on compass plot?
Thank you very much for the help!
Michael Haderlein
Michael Haderlein 2015 年 3 月 10 日
I don't get it... The origin is lost in the compass plot, but that's an inherent property of the compass plot and has nothing to do with the orientation. Set all x,y to zero and the arrows will align. Set x,y to their correct values (~=0) and they will shift to their correct position but remain their orientation.

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

カテゴリ

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