from
STRUCT2XML4EXCEL
by Scott Frasso
Write a large struct to xml for edting in Excel, and load it back into a struct.
|
| README.m |
%% STRUCT2XML and XML2STRUCT
% Editing and displaying the data in large structs can be difficult. For
% example; having to run a test using a large set of parameters might
% require the use of a struct which will of course contain data that will
% need to be edited or displayed.
%
% The solution to this problem is either A) Write your own GUI for editing
% data, or B) make use of XML and the power of displaying and editing data
% in EXCEL. The choice is yours, but if you would like to use EXCEL for
% editing such data please feel free to make use of STRUCT2XML and
% XML2STRUCT
%
%% How to use STRUCT2XML
% First we need to create a struct
struct = [];
struct(1).Name = 'MyName';
struct(1).FooArray = {'a' 'b' 'c'};
struct(2).Name = 'MyOtherName';
struct(2).FooArray = {'d' 'e' 'f'};
struct2xml(testStruct,'MyTestXML.xml');
%% How to use XML2STRUCT
% load the xml file you made with STRUCT2XML
testStruct = xml2struct('MyTestXML.xml');
|
|
Contact us at files@mathworks.com