How to write cell array to excel file
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (2)
Try this:
writecell(X, 'X.xlsx')
2 Kommentare
Walter Roberson
am 9 Apr. 2020
The result of that would be a single row with numel(a)+numel(b)+numel(c ) columns.
parham kianian
am 10 Apr. 2020
Qiang Lei
am 20 Mai 2022
0 Stimmen
writetable(cell2table(X), 'X.xlsx')
Kategorien
Mehr zu Spreadsheets finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!