How can I join two vectors?
Ältere Kommentare anzeigen
I have two column vectors (nx1), and I need to concatenate them together end to end, to end up with another column vector that will be, let's say, (2n,1) size. I tried to use "cat" function like this:
cat(2,a,b)
Where "a" and "b" are column vectors, but it doesn't work as I was expecting, the same way it works when "a" and "b" are arrays: a=[1 2 3] and b=[4 5 6] for example. Is there a way to accomplish that?
Akzeptierte Antwort
Weitere Antworten (1)
Larissa Rocha
am 18 Mär. 2021
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!