MATLAB: Write cell arrays to matlab

cellxlswrite

Hi,
I have a matrix A containing 1×24 cells. Each cell contains data cx1, with c being variable. So, A{1} is 2360×1, while A{2} is 2344×1 etc.
Now I want each cell to be written in a separate sheet in excel. How can I do this? I tried several approaches but get errors all the time..
Anyone knows how to do this?

Best Answer

for K = 1 : length(A)
thissheetname = sprintf('Sheet#%02d', K);
xlswrite('YourFile.xls', A{K}, thissheetname);
end