How can I make one vector out of two vectors with different lengths?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Mathieu NOE
le 18 Déc 2020
sure
C = [B A]; % horizontal concatenation
C = [B(:); A(:)]; % vertical concatenation
Réponses (1)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!