How do I save the contents of a structure as a textfile?
4 views (last 30 days)
Show older comments
In my workspace, I have a 1x1 structure called output. Shown on the left are 31 fields in this structure with values. How do I save ALL the content of this structure as a single .xls (or txt or csv) file. For example, ECG_II 1x1 structure contains time and values each with 216372x1 double.
2 Comments
Accepted Answer
More Answers (2)
KSSV
on 14 Feb 2019
S = struct() ;
S.time = (1:100)' ;
S.values = rand(100,1) ;
S.type = 'Wave form' ;
S.unit = 'mv' ;
S.samplerate = 300 ;
iwant = [S.time S.values] ;
xlswrite('test.xlsx',iwant) ;
0 Comments
See Also
Categories
Find more on Variables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!