vertcat will concatenate arrays/matrices with the same number of columns on top of each other.
Alternatively, you can just do it manually with something like
a = [1, 2];
b = [3, 4];
a = [a; b];
Here, the semi-colon denotes a new row.
Question
I have a matrix of 2 values let say matrix=[1,2]; Now I want to insert 3,4 into the matrix, below 1,2. in the end I want a matrix with 2 cols and with n values. Can you help me please? thanks!
Solution
vertcat will concatenate arrays/matrices with the same number of columns on top of each other.
Alternatively, you can just do it manually with something like
a = [1, 2];
b = [3, 4];
a = [a; b];
Here, the semi-colon denotes a new row.