Multidimensional Array Conversion way

1 Ansicht (letzte 30 Tage)
Faisal Memon
Faisal Memon am 23 Dez. 2014
Kommentiert: Faisal Memon am 23 Dez. 2014
Is there any built in function or direct way to convert a 10 by 1e5 by 10 Array in to 100 by 1e5 array???

Akzeptierte Antwort

Roger Stafford
Roger Stafford am 23 Dez. 2014
A = reshape(permute(A,[1,3,2]),[],1e5);

Weitere Antworten (1)

Guillaume
Guillaume am 23 Dez. 2014
Use reshape:
in = rand(10, 1e5, 10);
out = reshape(in, 100, 1e5);
  1 Kommentar
Faisal Memon
Faisal Memon am 23 Dez. 2014
Dear Guillaume,
Thanks for the answer. But this command changes the data. I don't see orderly data. In first page of in array there are 10 rows and 1e5 columns. Keeping the data in the same place i want to change the array of 10 by 1e5 by 10 to 100 by 1e5, which reshape does not perform.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by