Re-arrange vectors from rows to columns

2 visualizzazioni (ultimi 30 giorni)
I have 3 vector in rows as follows:
A = 1 1 1 1 1 1 1 1 1 1
B= 2 2 2 2 2 2 2 2 2 2
C= 3 3 3 3 3 3 3 3 3 3
I need only one vector with A, B and C as columns as follows:
D=
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
1 2 3
Thank you!

Risposta accettata

Raj
Raj il 5 Mar 2019
A = [1 1 1 1 1 1 1 1 1 1];
B= [2 2 2 2 2 2 2 2 2 2 ] ;
C= [3 3 3 3 3 3 3 3 3 3];
A=A';
B=B';
C=C';
D=[A B C]
  2 Commenti
Stephen23
Stephen23 il 5 Mar 2019
Modificato: Stephen23 il 5 Mar 2019
Note that it is a good habit to learn to use basic transpose .' rather than complex conjugate transpose '

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by