How can I make one vector out of two vectors with different lengths?
1 回表示 (過去 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!