How to turn a matrix into a Multidimensional Array?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tristan
am 28 Okt. 2013
Bearbeitet: Andrei Bobrov
am 28 Okt. 2013
for example if I have:
>> A=[2 8; 0 5]
A =
2 8
0 5
and I want to separate each row so that A=
A(:,:,1) =
2 8
A(:,:,2) =
0 5
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 28 Okt. 2013
Bearbeitet: Andrei Bobrov
am 28 Okt. 2013
permute(A,[3 2 1])
or
reshape(A.',1,size(A,2),[])
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Operators and Elementary Operations 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!