Undefined function or variable 'realizePosition'

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jum Wld
Posts: 15
Joined: Tue Jan 31, 2017 10:14 am

Undefined function or variable 'realizePosition'

Post by Jum Wld » Sat Mar 11, 2017 12:17 pm

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?

User avatar
Thomas Uchida
Posts: 1790
Joined: Wed May 16, 2012 11:40 am

Re: Undefined function or variable 'realizePosition'

Post by Thomas Uchida » Sat Mar 11, 2017 9:47 pm

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.

POST REPLY