How can I make one vector out of two vectors with different lengths?
조회 수: 3 (최근 30일)
이전 댓글 표시
Is it possible to make one vector out of two vectors with different lengths?
A = [1 1 1 1]
B = [0 0 1 0 1 0]
--> C = [0 0 1 0 1 0 1 1 1 1]
Thank for your help!
댓글 수: 2
Mathieu NOE
2020년 12월 18일
sure
C = [B A]; % horizontal concatenation
C = [B(:); A(:)]; % vertical concatenation
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!