Hi,
I am trying to open the Toylanding_AFO model in the MATLAB.
Here are my code
import org.opensim.modeling.*
model = Model('D:\INDIVIDUAL PROJECT\opensim\OpenSim 4.4\Resources\Models\NEWdLanding\ToyLandingModel_AFO.osim');
state = osimModel.initSystem();
Now I received the error as below,
Java exception occurred:
java.io.IOException: Object: Cannot open file D:\INDIVIDUAL PROJECT\opensim\OpenSim
4.4\Resources\Models\NEWdLanding\ToyLandingModel_AFO.osim. It may not exist or you do not have permission to read
it.
Thrown at Object.cpp:105 in Object().
at org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_1(Native Method)
at org.opensim.modeling.Model.<init>(Model.java:821)
I can't find the reason of the error. Just check the path and there is no mistake. Any help would be appreciated.
Thanks,
John
Problem about opening a Opensim Model in MATLAB
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: Problem about opening a Opensim Model in MATLAB
Does Matlab have permission to access the D: drive ("you do not have permission to read it")? Perhaps try moving the .osim file into a new folder on your desktop or in a directory that you know Matlab can access (e.g., "C:\Users\John\Documents\MATLAB").