how to find visual angle
古いコメントを表示
I have these three points(red dots) ,and I have to find angle, I am using polyfit function to calculate angle(finding slope first).

Now angle I am getting is near to 87 degrees, which is correct . But the thing is, I want to find the visual angle, which in this case will be near to 30 degrees. Any idea how to proceed with this? Thanks
3 件のコメント
Walter Roberson
2016 年 5 月 10 日
What are you calculating the angle between? Is the 87 degrees the angle from the first red dot to the second? From the second to the third? And which is the "visual" angle?
I suspect the "visual angle" might be atan2((y3-y1), (x3-x1)) in radians
smriti marathe
2016 年 5 月 10 日
Walter Roberson
2016 年 5 月 10 日
Which angle are you calculating as 87? (a-b) to (b-c) ? There is nothing that to me looks almost 90 degrees. But dot a- dot c- dot b might be maybe 115 degrees or so ?
回答 (1 件)
Roger Stafford
2016 年 5 月 10 日
編集済み: Roger Stafford
2016 年 5 月 10 日
The true angle between ba and bc would be:
ang = atan2( abs((xa-xb)*(yc-yb)-(ya-yb)*(xc-xb)) , ...
(xa-xb)*(xc-xb)+(ya-yb)*(yc-yb) );
Your plot without an 'axis equal' restriction will distort these angles.
カテゴリ
ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
