Azzera filtri
Azzera filtri

how i reshape data matrix?

1 visualizzazione (ultimi 30 giorni)
yasmeen hadadd
yasmeen hadadd il 27 Set 2016
Commentato: KSSV il 28 Set 2016
Hello;
h have a matrix with size 66x100 how i change it's size to 1x6600
thanks

Risposta accettata

José-Luis
José-Luis il 27 Set 2016
Modificato: José-Luis il 27 Set 2016
bla = rand(66,100);
bla = bla(:)';
Please read the documentation on reshape

Più risposte (1)

KSSV
KSSV il 27 Set 2016
Modificato: KSSV il 27 Set 2016
A = rand(66,100) ;
A = A(:) ; % joins column by column
% if you want row by row
A = rand(66,100) ;
A = A' ;
A = A(:) ;
  2 Commenti
José-Luis
José-Luis il 27 Set 2016
That would give column vector and not a row vector.
KSSV
KSSV il 28 Set 2016
Transposing it gives a column vector.

Accedi per commentare.

Categorie

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

Community Treasure Hunt

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

Start Hunting!

Translated by