Export multiple datasets to one Excel sheet in Matlab -


hej, have data, want export excel. data consists of several sequences, , each sequence stored dataset. normally, 'dataset' class quite neat, allowing store variable , observation names. therefore, keep it.

for single datasets use 'export' function (as opposed 'xlswrite'), e.g.:

export(data, 'xlsfile' ,[pathname '\' filename],'sheet',1);  

this writes dataset 'data' specified spread sheet.

now want export multiple datasets 1 spread sheet. thus, can't use 'export' function anymore (as far know).

i know can specify range function 'xlswrite' , make nice loop, e.g.:

for isequence 1:nrsequences    xlrange= ...;    xlswrite([pathname '\' fname],data{isequence},sheetnumber,xlrange);    end 

this works fine if 'data{isquence}' array, but... not work datasets. trying datasets produces following error:

'error using xlswrite (line ...)    input data must numeric, cell, or logical array.' 

so, know, how this?

<<this copy of suggestion comment appears have solved op's problem>>

you may have noticed mathworks' notification in documentation dataset:

the dataset data type might removed in future release. work heterogeneous data, use matlab® table data type instead. see matlab table documentation more information.

therefore, should make transition table. then, use built-in functions support table-to-excel export.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -