Transform a 3D dimension array to n 2D matrix
显示 更早的评论
How can I transform a 3D dimension array (15*781*81) to 15 extracted 781*81 2D matrix to make it feasible to write down them in different Excel files?
Cheers,
Hiua
采纳的回答
更多回答(1 个)
Stephen23
2019-7-24
"How can I transform a 3D dimension array (15*781*81) to 15 extracted 781*81 2D matrix to make it feasible to write down them in different Excel files?"
There is no point in creating a separate cell array with duplicates of all of the data.
Simply loop over the array and save it as you go:
A = your 15x781x81 array
for k = 1:size(A,1)
M = permute(A(k,:,:),[2,3,1]);
... save M here
end
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!