I have an 288x384x52 double array which I would like to transform to 288x52x384 double

1 comentario

Rona Shaharabani
Rona Shaharabani el 14 de Jun. de 2020
Thank you. I tried that, and it did not give an array of 288x52x384 instead

Iniciar sesión para comentar.

 Respuesta aceptada

Matt J
Matt J el 14 de Jun. de 2020
Editada: Matt J el 14 de Jun. de 2020

0 votos

permute(yourArray,[1,3,2])

4 comentarios

Rona Shaharabani
Rona Shaharabani el 14 de Jun. de 2020
Thank you. I tried that and it did not give an array of 288x52x384 instead
Matt J
Matt J el 14 de Jun. de 2020
Works fine for me:
>> A=rand(288,384,52); Aperm=permute(A,[1,3,2]); whos A Aperm
Name Size Bytes Class Attributes
A 288x384x52 46006272 double
Aperm 288x52x384 46006272 double
Rona Shaharabani
Rona Shaharabani el 14 de Jun. de 2020
You are right, I just run it again and it did change the array... Thank you so much!
Matt J
Matt J el 14 de Jun. de 2020
You're welcome, but please Accept-click the answer to indicate that your question was resolved.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 14 de Jun. de 2020

Comentada:

el 14 de Jun. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by