Editing osim files from matlab using xmliotools

Provides tools for using different aspects of Opensim within the Matlab environment, including command line pipelines as well as accessing the Opensim API directly.
POST REPLY
User avatar
William Anderton
Posts: 2
Joined: Thu Dec 12, 2013 7:12 am

Editing osim files from matlab using xmliotools

Post by William Anderton » Mon Aug 18, 2014 1:31 pm

Hi,

I am attempting to read, edit, and then write an OSIM file to a different location using Matlab. I am using the most current set of matlab pipeline tools with Matlab 2014a.

I am able to read in the osim file just fine, using

OpenSimDocument = xml_read('C:\Users\Engineer\Desktop\Knee OA OpenSim\Arnoldetal2010_2Legs_Default_v2.osim');

However, even when I make no changes to this structure, when I write the model, OpenSim 3.2 is no longer able to understand it. There is some kind of syntax error introduced and I cannot understand what has changed. This is the command I am using to write the OSIM file:

xml_write('newmodel.osim',OpenSimDocument);

I have read on other forums that there may have been some formatting changes to the OSIM file format and that the matlab functions I am calling may be expecting older versions of OSIM files?

Has anyone been able to get around this? I am using the default xml_write() engine which I think is the xerces engine.

POST REPLY