How to write cell array to excel file
古いコメントを表示
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?
採用された回答
その他の回答 (2 件)
Try this:
writecell(X, 'X.xlsx')
2 件のコメント
Walter Roberson
2020 年 4 月 9 日
The result of that would be a single row with numel(a)+numel(b)+numel(c ) columns.
parham kianian
2020 年 4 月 10 日
Qiang Lei
2022 年 5 月 20 日
0 投票
writetable(cell2table(X), 'X.xlsx')
カテゴリ
ヘルプ センター および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!