Re-arrange vectors from rows to columns

조회 수: 2 (최근 30일)
Francisco Anaya
Francisco Anaya 2019년 3월 5일
편집: Stephen23 2019년 3월 5일
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!

채택된 답변

Raj
Raj 2019년 3월 5일
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
Francisco Anaya
Francisco Anaya 2019년 3월 5일
thank you!
Stephen23
Stephen23 2019년 3월 5일
편집: Stephen23 2019년 3월 5일
Note that it is a good habit to learn to use basic transpose .' rather than complex conjugate transpose '

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by