I have a 1 by 20 by 3 array and want to reshape it to 3 by 20 matrix

 Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 4 Sep. 2019

1 Stimme

squeeze()
transpose()

Weitere Antworten (1)

Bruno Luong
Bruno Luong am 4 Sep. 2019
Bearbeitet: Bruno Luong am 4 Sep. 2019

1 Stimme

Not RESHAPE, but PERMUTE (there is movement in internal storage, and it more expansive than RESHAPE)
A = permute(A, [3 2 1]);

Kategorien

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by