With a single use-case you could just write your own function by expanding the example given in MATLAB help xmlwrite, or you could try out struct2xml or similar from the FileExchange...
Load data from .MAT into .XML
5 次查看(过去 30 天)
显示 更早的评论
I made some measurements that are stored in .mat files as (e.g. 5x3) matrixes for different N conditions (so, generally 5x3xN-matrixes). How can I load the values from this matrixes into a .XML-pattern (see simplified version below)?
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<X>1 2 3</X>
<Y>100 200 300 400 500</Y>
<ConditionAxis>25 125</ConditionAxis>
<Measurements>
<Condition>
<Values></Values>
<Values></Values>
<Values></Values>
<Values></Values>
<Values></Values>
% so that for the 1st condition it would be 5x3-matrix like this:
% <Values>1 2 3</Values>
% <Values>4 5 6</Values>
% <Values>7 8 9</Values>
% <Values>10 11 12</Values>
% <Values>13 14 15</Values>
</Condition>
<Condition>
<Values></Values>
<Values></Values>
<Values></Values>
<Values></Values>
<Values></Values>
% and here the other values for the 2nd condition and so on
</Condition>
</Measurements>
</Data>
Thanks before :)
Greetings, Artur
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!