Azzera filtri
Azzera filtri

How to reshape my matrix A to B

2 visualizzazioni (ultimi 30 giorni)
PRED LIU
PRED LIU il 8 Giu 2020
Commentato: madhan ravi il 8 Giu 2020
How to reshape my matrix A to B ??
A(:,:,1)=[ 8, 1, 6 ;...
3, 5, 7 ;...
4, 9, 2 ]
A(:,:,2)=[16, 2, 12 ;...
6, 10, 14 ;...
8, 18, 4 ]
A(:,:,3)=[24, 3, 18 ;...
9, 15, 21 ;...
12, 27, 6 ]
B= 8 1 6
3 5 7
4 9 2
16 2 12
6 10 14
8 18 4
24 3 18
9 15 21
12 27 6

Risposta accettata

KSSV
KSSV il 8 Giu 2020
B = reshape(permute(A,[2 1 3]),3,[])'
  6 Commenti
KSSV
KSSV il 8 Giu 2020
2020a
madhan ravi
madhan ravi il 8 Giu 2020
? OP is using 2019b

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by