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.
我在Matlab中有幾個列表要寫入同一個excel文件。我有一個xordered列表和另一個列表aspl。在運行Matlab程序之前,我不知道列表的長度。
I used
我用了
data = xlswrite('edgar.xls',fliplr(sortedx'),'A2:A3000')
for 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
對於第一個列表但是當我嘗試將另一個列表寫入同一個文件時,我最終得到了兩個名為edgar.xls的不同excel文件
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?
有沒有辦法可以將這兩個列表寫入同一個excel文件中?在A列中排序並在B列中輸入aspl?
1 个解决方案
#1
2
d = [ fliplr(sortedaspl'), fliplr(sortedx')];
d = [fliplr(sortedaspl'),fliplr(sortedx')];
Makes a matrix from A2 to B300
制作從A2到B300的矩陣
data = xlswrite('edgar.xls',d,'A2:B300');
data = xlswrite('edgar.xls',d,'A2:B300');