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

4 visualizaciones (últimos 30 días)
Hayfa R
Hayfa R el 31 de Mzo. de 2019
Respondida: Hayfa R el 1 de Abr. de 2019
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 comentario
dpb
dpb el 31 de Mzo. de 2019
Editada: dpb el 31 de Mzo. de 2019
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.

Iniciar sesión para comentar.

Respuesta aceptada

Akira Agata
Akira Agata el 1 de Abr. de 2019
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

Más respuestas (2)

Hayfa R
Hayfa R el 1 de Abr. de 2019
It worked well! thank you!

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by