How to write cell array to excel file
Mostra commenti meno recenti
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?
Risposta accettata
Più risposte (2)
Try this:
writecell(X, 'X.xlsx')
2 Commenti
Walter Roberson
il 9 Apr 2020
The result of that would be a single row with numel(a)+numel(b)+numel(c ) columns.
parham kianian
il 10 Apr 2020
Qiang Lei
il 20 Mag 2022
0 voti
writetable(cell2table(X), 'X.xlsx')
Categorie
Scopri di più su Spreadsheets in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!