creating mxn matrix from mxnxp matrix [without jumbling elements]
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a matrix A(60x100x6). I want to place the matrix from each of the 6th index one below the other to have B(360x100).
Example:
60x100
60x100
60x100
60x100
60x100
60x100
I tried using 'B=reshape(A,360,[])' but the values were somehow jumbled.
please help
0 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 29 Mär. 2012
A = repmat(magic(5),[1 1 6]); %easy to verify
A = reshape(permute(A,[2 1 3]),size(A,1),[])'; %permute, pull columnwise to 2d, transpose to undo permute
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing 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!