3D Matrix (n*m*p) in Table

2 次查看(过去 30 天)
Hello,
I m trying to convert a 3D matrix (n*m*p) in a p* excel sheets with an (n*m) Table in each sheet,
I tried to do it in a for loop but i cant create a 3D Table, and I cant change the variable inside the loop.
Can you please help me. thanks
  1 个评论
dpb
dpb 2019-3-31
编辑:dpb 2019-3-31
Should be no problem at all...show us the code you tried and to ensure we're on the same page what the output from
whos X
where "X" is the variable name of your 3D array.

请先登录,再进行评论。

采纳的回答

Akira Agata
Akira Agata 2019-4-1
How about the following?
% Sample data (n,m,p were assumed to be 20,10,5,respectively)
A = rand(20,10,5);
% Save as an Excel file
for kk = 1:size(A,3)
xlswrite('yourExcel.xlsx',A(:,:,kk),kk);
end

更多回答(2 个)

Hayfa R
Hayfa R 2019-4-1
It worked well! thank you!

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by