Write in Excel With Matlab on continues Cells
显示 更早的评论
Hello!, I'm trying to make a code which writes data of a matrix in an Excel Worksheet, however, I'd like to write several matrices one after the other, the problem is that with the function xlswrite I have to specify the cell were the matrix is going to be written, and depends on the data there will be diferents quantities of matrices.
Right now I have this:
fprintf('Select file location \n');
ubic=uigetdir;
name=input('Specify Name of the file: ','s');
comp=strcat(ubic, '\',name, '.xls');
nomhoja='Desplazamiento';
for i=1:np
head={'t (seg)', 'x (cm)'};
xlswrite(comp, head, nomhoja, 'A1');
xlswrite(comp, [rangT',maximox(i,1:num)'], nomhoja, 'A2');
end
As you can see I need to write this matrix [rangT',maximox(i,1:num)'] 'np' times, so when I write 'A1' for the first loop it's fine but for the next one I need it to be 'C1', the next one 'E1'.. etc
Hope You can help me
Thanks!!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!