How to accelerate the permute for 3D matrix

1 Ansicht (letzte 30 Tage)
AniCnx
AniCnx am 25 Okt. 2021
Kommentiert: James Tursa am 25 Okt. 2021
How to accelerate the permute for the matrix 512x512x200 by using version R2020b?
such as
A=randi(512,[512 512 200]);
B=permute(A,[3,2,1]);
  1 Kommentar
James Tursa
James Tursa am 25 Okt. 2021
The better question is what are you doing with this result downstream in your code, and is there a way to accomplish what you want to do without permuting the data (which involves deep data copies).

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jan
Jan am 25 Okt. 2021
You can't. permute works efficiently already.

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by