Scaling with Matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Carlo Tricarico
Posts: 21
Joined: Mon Jul 29, 2013 8:21 am

Scaling with Matlab

Post by Carlo Tricarico » Sun Feb 16, 2014 1:04 pm

Hello everybody,
I was trying to execute a scaling operation of a model using matlab. Since now I was able to create two objects by doing:
- SC = ScaleTool('Setup_scale.xml');
- I = SC.getModelScaler();
- II = SC.getMarkerPlacer();

Now I have read that, in order to obtain the results needed, it is necessary to use the command 'processModel(...)' but I really can understand what are the inputs I have to put inside it. Can anyone help me?

Thanks in advance

-Carlo

User avatar
David John Saxby
Posts: 83
Joined: Mon May 09, 2011 8:39 pm

Re: Scaling with Matlab

Post by David John Saxby » Tue Feb 18, 2014 12:24 am

Hi Carlo,

In the doxygen, https://simtk.org/api_docs/opensim/api_ ... 1b85ed4ff2, you will find the inputs.

modelScaler.processModel(states, model, pathtoSubject, mass)

So you need to provide model states, the model, the path to where the subject's data is, and the subject mass.

model = Model(yourModelHere);
states = model.initSystem();

Cheers,

David

User avatar
Carlo Tricarico
Posts: 21
Joined: Mon Jul 29, 2013 8:21 am

Re: Scaling with Matlab

Post by Carlo Tricarico » Tue Feb 18, 2014 8:02 am

David,
your help has been tremendously helpful, I have to thank you a lot. Just one more thing: once I've done the same thing to the MarkerPlacer, the results will be shown in the directory I've put inside the inputs of the "processModel " command?

Thanks

-Carlo

POST REPLY