Getting muscle path information in Matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Dennis Anderson
Posts: 6
Joined: Fri Aug 01, 2008 5:12 am

Getting muscle path information in Matlab

Post by Dennis Anderson » Mon Jun 24, 2013 10:13 am

Hi All,

I am trying to get muscle path information out of a model via Matlab. I am able to get the path point set with something like:

aMuscleGeometry = aMuscle.getGeometryPath();
aPathPointSet = aMuscleGeometry.getPathPointSet();

and then can get information, e.g. body name and location, for muscle "n":

Body = aPathPointSet.get(n).getBodyName
Location = ArrayDouble.getValuesFromVec3(aPathPointSet.get(n).getLocation())

However, what I'd really like to get is the "current" muscle path, including wrapping points if present. I've tried using "getCurrentPath", i.e.:

CurrentPath = aMuscleGeometry.getCurrentPath(state);

This seems to work, but I can't figure out how to get actual path point information (body or location) at this point.
"CurrentPath.get(n).getLocation()" returns an error.

Unfortunately I'm not well versed in java. I suspect there's something very basic that I'm missing, but I haven't been able to figure out what. Thoughts?

Thanks,
Dennis

User avatar
Ayman Habib
Posts: 2251
Joined: Fri Apr 01, 2005 12:24 pm

Re: Getting muscle path information in Matlab

Post by Ayman Habib » Mon Jun 24, 2013 10:49 am

Hi Dennis,

You should be looking at the Doxygen documentation for available methods that you can call (in Matlab pressing TAB should show possible completions. In the case of GeometryPath you'd need to call something like

Code: Select all

currentPath = aMuscleGeometry.getCurrentPath(state);
currentPath.getitem(i).getLocation()
Hope this helps,
-Ayman

User avatar
Dennis Anderson
Posts: 6
Joined: Fri Aug 01, 2008 5:12 am

Re: Getting muscle path information in Matlab

Post by Dennis Anderson » Mon Jun 24, 2013 10:58 am

Yes, this works, many thanks Ayman!

I knew I was missing something simple, and I had not picked up on the "Tab" trick either. That will certainly be helpful!

-Dennis

POST REPLY