Page 1 of 1

Error while running a example matlab code

Posted: Sun Apr 29, 2018 7:10 pm
by karishma94
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)

Re: Error while running a example matlab code

Posted: Sun Apr 29, 2018 8:52 pm
by tkuchida
MATLAB may not have the necessary permissions to write to the current directory. From what directory are you running this script?

Re: Error while running a example matlab code

Posted: Sun Apr 29, 2018 9:24 pm
by karishma94
Thank you so much for your help!!
It finally worked. You were right about the permission.