Page 1 of 1

Set compute_moments to 'True'

Posted: Mon Feb 13, 2017 12:08 am
by julian_atkinson
Hi there

I am trying to use the Muscle analysis tool through the API using matlab.

I am trying to set the compute_moments value to true but I cannot find the setComputeMoments setter anywhere?

Alternatively I tried to pass in a template xml file however matlab would crash and shut down when I attempted this.

Thank you

Julian

Re: Set compute_moments to 'True'

Posted: Mon Feb 13, 2017 2:06 pm
by jimmy
The Doxygen documemtation indicates that setComputeMoments is a public method on Muscle Analysis:
https://simtk.org/api_docs/opensim/api_ ... f9b4e6fa13

How are you coding the analysis in Matlab?

Re: Set compute_moments to 'True'

Posted: Mon Feb 13, 2017 11:40 pm
by julian_atkinson
Thanks for your help James.

I was writing mine using the BOPS (https://simtk.org/projects/bops) as a guide, editing where necessary. They use the AnalyzeTool.h file. What is the difference between the two?

Thanks,
Julian

Re: Set compute_moments to 'True'

Posted: Tue Feb 14, 2017 10:55 am
by jimmy
The tools are a package of subclasses that work to do a specific type of analysis. Muscle Analysis is one of a number of different analyses that can be used by the AnalyzeTool.

This recent thread has code from that shows how you can add a muscle analysis to a model.