How to write cell array to excel file
Mostrar comentarios más antiguos
I have a cell array whose elements have different sizes. How can I write it to an excel file?
For example:
a = rand(10,1);
b = rand(5,1);
c = rand(4,8);
X = {a, b, c};
How can I export X to an excel file?
Respuesta aceptada
Más respuestas (2)
Try this:
writecell(X, 'X.xlsx')
2 comentarios
Walter Roberson
el 9 de Abr. de 2020
The result of that would be a single row with numel(a)+numel(b)+numel(c ) columns.
parham kianian
el 10 de Abr. de 2020
Qiang Lei
el 20 de Mayo de 2022
0 votos
writetable(cell2table(X), 'X.xlsx')
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!