...
Code Block |
---|
>>> muscles = model.getMuscles().get(0); >>> thelenMuscle = Thelen2003Muscle.safeDownCast(muscle) >>> ADD CODE TO DO SOMETHING |
Case 2: The thing (class) I want to create has a name like Array_<double>.
As you look through the OpenSim doxygen or if you look at OpenSim API examples, in C++, you may see objects/classes with names like Array_<double> or Vec<3>. These are called templatized classes; this is another functionality that exists in C++ to help programmers simplify and reuse common code. But this doesn't exist in Matlab. So we have created scripting versions of the most commonly used templatized classes. You can find a list of all of these on the page Scripting Versions of OpenSim C++ API Calls. If you see a class name with angle brackets (< >), you can look it up on this page to find the class name to use in Matlab.
...