I am trying to calculate moment arm using MATLAB interface. To check the interface I compared calculated moment arm from OpenSim (uing plotter, then data export) with the calculated in MATLAB script.
I got either a time shift or a differnce in the values as in the attached fig as an example.
after I set the angles using :
Code: Select all
Coord.setValue(state, deg2rad(q(c)) )
Code: Select all
muscle.computeMomentArm(state, Coord)
Model: 'arm26.osim'
motion file:'arm26_states_degrees.mot';
DOF: Elbow flexion, shoulder_elev
Plot in openSim; X: moment arm_Elbow_flexion, Y: arm26_states_degrees
Anyone can help?
I really appreciate your time and advice