Page 1 of 1

Scaling with Matlab

Posted: Sun Feb 16, 2014 1:04 pm
by chass
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

Re: Scaling with Matlab

Posted: Tue Feb 18, 2014 12:24 am
by saxbyd
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

Re: Scaling with Matlab

Posted: Tue Feb 18, 2014 8:02 am
by chass
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