Re-arrange vectors from rows to columns

1 view (last 30 days)
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!

Accepted Answer

Raj
Raj on 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]

More Answers (0)

Community Treasure Hunt

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

Start Hunting!