2

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') 

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

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?

0

1 Answer 1

2

d = [ fliplr(sortedaspl'), fliplr(sortedx')];

Makes a matrix from A2 to B300

data = xlswrite('edgar.xls',d,'A2:B300');

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.