Problem using getMatterSubsystem in matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Maarten Sarens
Posts: 7
Joined: Sat Oct 10, 2015 11:34 am

Problem using getMatterSubsystem in matlab

Post by Maarten Sarens » Tue Apr 05, 2016 2:41 am

Hi all,

I have a problem with getting the location with respect to the ground. More excactly the problem is using the method getMatterSubsystem();

I use the following code :

Code: Select all

clc
close all
clear all
import org.opensim.modeling.*  % import class opensim.

osimModel = Model(modelFile2); % Model Motion Capture
s = osimModel.initSystem();
index_femur_r = osimModel.getBodySet().get('femur_r').getIndex();
femur_r = osimModel.getMatterSubsystem().getMobilizedBody(index_femur_r);
coordin_femur_r = femur_r.getBodyOriginLocation(s);
After running this code Matlab crashes. Can anyone help me out with this problem?

Greetings Maarten Sarens

POST REPLY