Page 1 of 1

Undefined function or variable 'getMuscleLength'

Posted: Sat Mar 11, 2017 12:20 pm
by jmat
Hello,

I am using 'getMuscleLength' in MATLAB script. I got an error : Undefined function or variable 'getMuscleLength'.

Is muscle.getLength(state) the same as muscle.getMuscleLength(state)?

Re: Undefined function or variable 'getMuscleLength'

Posted: Sat Mar 11, 2017 9:56 pm
by tkuchida
There doesn't seem to be a method named getMuscleLength. There is a Muscle::getMuscleLengthInfo() method, but that may not be available through the scripting interface (it returns a MuscleLengthInfo struct that MATLAB may not be able to interpret). The PathActuator::getMuscleLength() method will return the length of the muscle's path from origin to insertion. The documentation for the Muscle class can be found here: https://simtk.org/api_docs/opensim/api_ ... uscle.html.