Error while running a example matlab code

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Karishma Sebastian
Posts: 14
Joined: Tue Apr 17, 2018 5:17 am

Error while running a example matlab code

Post by Karishma Sebastian » Sun Apr 29, 2018 7:10 pm

Hey,
I am new to working on opensim-matlab environment and I would like your help to eliminate the following error.
Thank you.


>> OpenSimCreateTugOfWarModel
Error using OpenSimCreateTugOfWarModel (line 154)
Java exception occurred:
java.lang.RuntimeException: SimTK Exception thrown at Xml.cpp:79:
Error detected by Simbody method Xml::writeToFile(): Failed to write to the Xml file 'tug_of_war_muscles_controller.osim' with error ' (line=1, col=1)'.
(Required condition 'saveOK' was not met.)


at org.opensim.modeling.opensimModelJNI.OpenSimObject_print(Native Method)

at org.opensim.modeling.OpenSimObject.print(OpenSimObject.java:225)

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

Re: Error while running a example matlab code

Post by Thomas Uchida » Sun Apr 29, 2018 8:52 pm

MATLAB may not have the necessary permissions to write to the current directory. From what directory are you running this script?

User avatar
Karishma Sebastian
Posts: 14
Joined: Tue Apr 17, 2018 5:17 am

Re: Error while running a example matlab code

Post by Karishma Sebastian » Sun Apr 29, 2018 9:24 pm

Thank you so much for your help!!
It finally worked. You were right about the permission.

POST REPLY