Export several matrices to excel in MATLAB

拟墨画扇 提交于 2019-12-24 07:09:35

问题


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

回答1:


You can try:

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

Hope that helps.



来源:https://stackoverflow.com/questions/5244440/export-several-matrices-to-excel-in-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!