Load data from .MAT into .XML
7 ビュー (過去 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 件)
Julian
2015 年 10 月 19 日
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...
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!