These utilities enable the conversion of data written by programs on Mac OS X for use in MATLAB (and vice versa).
Anyone wanting to share data with programs written for Mac OS X can use these utilities to convert the native OS X storage format (XML Property List) to structures. XML Property Lists are the preferred textual representation of property list dictionaries.
These utilities convert from XML property list to a matlab structure and back, and include m-files for loading and saving XML property lists from matlab.
Info on OS X Property Lists: http://developer.apple.com/documentation/Cocoa/
I like this function. It's quite useful indeed.
I have a problem however when I try compiling it. The compiler tells me that it does not accept cells. I can rewrite a more restricted version of the program without cells but there is still a compilation problem because there is a line in the code where the input xml (an mxArray) is indexed
tag = xml( (ibra(itag)+1):(iket(itag)-1) );
I get the message: Subscripting into an mxArray is not supported.
What can I do to fix the problem?
However, I get an error when trying to import a plist where the Root is an Array, and each item in the array is a Dict with three Numbers (x, y, z coordinates).
Attempted to access arraylv(0); index must be a positive integer or logical.
Error in XMLPlistToStruct2 (line 112)
if arraylv(dictLevel) ==0
Error in loadXMLPlist (line 16)
[S KT]= XMLPlistToStruct2(text);