How do you write multiple lists from Matlab to the same excel file?
I have several lists in Matlab that I want to write to the same excel file.
I have one list xordered
and another list aspl
. I do not know the length of the lists till after I run the Matlab program.
I used
data = xlswrite('edgar.xls',fliplr(sortedx'),'A2:A3000')
fo开发者_开发知识库r the first list but when I tried to write another list to the same file like this I ended up with two different excel files named edgar.xls
asp_data = xlswrite('edagr.xls', fliplr(aspl'), 'B2:B3000')
Is there a way I can write both of these lists into the same excel file? xordered
in the A column and aspl
in the B column?
d = [ fliplr(sortedaspl'), fliplr(sortedx')];
Makes a matrix from A2 to B300
data = xlswrite('edgar.xls',d,'A2:B300');
精彩评论