how to calculate degree between 3 points in MATLAB?
7 ビュー (過去 30 日間)
古いコメントを表示
hi, how can i caculate degree between 3 points? i have position of X and Y of this three points. for more information please see this picture ( http://theme.tk/wp-content/uploads/2013/01/Untitled1.png ) and download this file ( http://theme.tk/wp-content/uploads/2013/01/data.zip ).
2 件のコメント
Azzi Abdelmalek
2013 年 1 月 1 日
In your image there are 4 points? Can you be more clear by giving an example of coordinates
回答 (2 件)
Roger Stafford
2013 年 1 月 1 日
Let row vectors P0 = [x0,y0], P1 = [x1,y1], and P2 = [x2,y2] be Calcaneus, L-Knee, and 2th_MT points, respectively. The angle shown in red in radians at Calcaneus point is:
ang = atan2(abs(det([P2-P0;P1-P0])),dot(P2-P0,P1-P0));
Multiply by 180/pi to get degrees.
Roger Stafford
10 件のコメント
Roger Stafford
2013 年 1 月 1 日
No mohammad, I think you had better do that. That last vectorized formula I presented will have to suffice for my contribution to your effort.
Image Analyst
2013 年 1 月 1 日
Check out this link:
2 件のコメント
Image Analyst
2013 年 1 月 1 日
Try this one then: http://www.mathworks.com/matlabcentral/newsreader/view_thread/276582 or do your own search.
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!