xlswrite multidimensional array in one sheet.
1 回表示 (過去 30 日間)
古いコメントを表示
I tried to export 6 x 6 x 1000 matrix from matlab to exel. However, the xlswrite overwrite it.
I used the following loop to resolve the issue
for j=1: length(Matrix,3)
xlswrite('xlsName.xls',Matrix(:.:,j),j)
end
But, it print the new data to the new sheet and it is not what I wanted.
Any help is appreciated!.
Thanks
0 件のコメント
採用された回答
その他の回答 (1 件)
Ameer Hamza
2020 年 6 月 5 日
編集済み: Ameer Hamza
2020 年 6 月 5 日
First convert the data to a 2D matrix
M = rand(6, 6, 100);
M_new = reshape(permute(M, [2 1 3]), 6, []).';
and then you can use xlswrite().
writematrix() can also handle multidimensional arrays.
参考
カテゴリ
Help Center および File Exchange で MATLAB Report Generator についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!