How can I make one vector out of two vectors with different lengths?
    4 次查看(过去 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!


