edgarmtze
edgarmtze

Reputation: 25048

Export several matrices to excel in MATLAB

I want to write to an excel file n matrices, if I would like 2 to be in the same page, and other two on the same page, how to do it

I have

xlswrite('file.xls', matrix1, 'page1', 'A1');
xlswrite('file.xls', matrix2, 'page1', 'A50');

Is there a way to make dynamic the 4th parameter like

xlswrite('file.xls', matrix2, 'page1', 'A'%size(matrix));

Upvotes: 1

Views: 5052

Answers (1)

O_O
O_O

Reputation: 4477

You can try:

xlswrite('file.xls', matrix2, 'page1', ['A' num2str(length(matrix2))]);

Hope that helps.

Upvotes: 1

Related Questions