how to merge two vectors
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
A= [ 0.567 6.345 1.789 0.678 0.4678] B= [0 0 0 0 0 0 0 ]
result will be
C= [0.567 6.345 1.789 0.678 0.4678 0 0]
0 Commenti
Risposta accettata
Mischa Kim
il 14 Feb 2014
Modificato: Mischa Kim
il 14 Feb 2014
How about:
C = B + [A zeros(1,length(B)-length(A))]
assuming that by merge you mean add-merge. If it's just about adjusting the size of the vector, then use
C = [A zeros(1,length(B)-length(A))]
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Automated Driving Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!