how to calculate degree between 3 points in MATLAB?

조회 수: 8 (최근 30일)
Mahan Soltani
Mahan Soltani 2013년 1월 1일
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
Azzi Abdelmalek 2013년 1월 1일
In your image there are 4 points? Can you be more clear by giving an example of coordinates
Mahan Soltani
Mahan Soltani 2013년 1월 1일
편집: Mahan Soltani 2013년 1월 1일
yes,but i need degree that is red and (?degree). degree between two line(L-Knee point & Calcaneus) and (Calcaneus & 2th_MT). this image is a motion analys that i need degree of Ankle. some of data is : ( http://theme.tk/wp-content/uploads/2013/01/data-1.zip ) .

댓글을 달려면 로그인하십시오.

답변 (2개)

Roger Stafford
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
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.
Mahan Soltani
Mahan Soltani 2013년 1월 2일
Learning MATLAB on this time is hard and confusing for me. my field is Physical Therapy and i can't uderstand MATLAB very well...

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2013년 1월 1일
  댓글 수: 2
Mahan Soltani
Mahan Soltani 2013년 1월 1일
on those post, 2 point are available, but i need 3 point which one of them isn't (0 0 0)! if you see image, you could uderstand...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by