To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
I'm working right now with data from a motion capture device, essentially picking up data for three markers placed on the head neck and shoulder in an x y z plane.
My difficulty trying to develop a code to calculate the joint angles between these three markers. I am able to animate the three coordinates to play as an animation, but I'm more interested in the calculation of the angles between these points changing over time.
Any ideas on how to go about this?
No products are associated with this question.
At any time, let H = [x,y,z], N = [x,y,z], S = [x,y,z] be coordinate vectors of the head, neck, and shoulder markers at that time. Then the three respective inner angles within the triangle HNS then are:
h = atan2(norm(cross(N-H,S-H)),dot(N-H,S-H)); n = atan2(norm(cross(S-N,H-N)),dot(S-N,H-N)); s = atan2(norm(cross(H-S,N-S)),dot(H-S,N-S));
(The sum of these should always be pi to within round-off accuracy.)