MATLAB: Angle between three points (in 3D)

3dangletwosegments

Hello Everyone,
I am trying to find an angle between two segments (Shoulder – Elbow and Elbow – Wrist) where Shoulder, Elbow and Wrist are the three points in the space which have x, y and z points and they have 1000 points. I am a little confused about how to calculate the angle when I have 1000 points? For the reference, I have attached the excel document and the figure. Thank you !
PA

Best Answer

Use dot product
220px-Inner-product-angle.svg.png