Borrar filtros
Borrar filtros

Write cell arrays to matlab

2 visualizaciones (últimos 30 días)
Bas
Bas el 17 de Sept. de 2015
Comentada: Bas el 17 de Sept. de 2015
Hi,
I have a matrix A containing 1x24 cells. Each cell contains data cx1, with c being variable. So, A{1} is 2360x1, while A{2} is 2344x1 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?

Respuesta aceptada

Walter Roberson
Walter Roberson el 17 de Sept. de 2015
for K = 1 : length(A)
thissheetname = sprintf('Sheet#%02d', K);
xlswrite('YourFile.xls', A{K}, thissheetname);
end
  1 comentario
Bas
Bas el 17 de Sept. de 2015
Thanks this works :)

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by