Page 1 of 1

Undefined function or variable 'realizePosition'

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

1- I used the code below in Maatlab scripting:

Code: Select all

myModel.realizePosition(state)
and got the error:
Undefined function or variable 'realizePosition'.

2- What is the difference between myModel.realizePosition and myModel.updCoordinateSet

Can anyone advise?

Re: Undefined function or variable 'realizePosition'

Posted: Sat Mar 11, 2017 9:47 pm
by tkuchida
I used the code below in Maatlab scripting and got the error: Undefined function or variable 'realizePosition'.
The ModelComponent::realizePosition() method may not be available through the scripting interface. Depending on what you're trying to do, you may be able to use Model::initSystem() (https://simtk.org/api_docs/opensim/api_ ... 69c20ea17a) instead. You can use the "methodsview" function to see what methods are available in MATLAB (see http://simtk-confluence.stanford.edu:80 ... ith+Matlab).
What is the difference between myModel.realizePosition and myModel.updCoordinateSet
These methods are very different. ModelComponent::realizePosition() updates the position-dependent calculations in the State. You can find more information about the "realize" methods in Chapter 7 of the Simbody Theory Manual (available from https://simtk.org/docman/?group_id=47, under "User Documentation").

Model::updCoordinateSet() returns a writable reference to the Model's set of Coordinates.