Re-arrange vectors from rows to columns

15 Ansichten (letzte 30 Tage)
Francisco Anaya
Francisco Anaya am 5 Mär. 2019
Bearbeitet: Stephen23 am 5 Mär. 2019
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!

Akzeptierte Antwort

Raj
Raj am 5 Mär. 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 Kommentare
Francisco Anaya
Francisco Anaya am 5 Mär. 2019
thank you!
Stephen23
Stephen23 am 5 Mär. 2019
Bearbeitet: Stephen23 am 5 Mär. 2019
Note that it is a good habit to learn to use basic transpose .' rather than complex conjugate transpose '

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by