How to write cell array to excel file
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (2)
Try this:
writecell(X, 'X.xlsx')
2 commentaires
Walter Roberson
le 9 Avr 2020
The result of that would be a single row with numel(a)+numel(b)+numel(c ) columns.
parham kianian
le 10 Avr 2020
Qiang Lei
le 20 Mai 2022
0 votes
writetable(cell2table(X), 'X.xlsx')
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!