MATLAB: Hi i have a question for example I have these two matrices a and b and I want to join them in one, how could I do that

matrix array

a=[1;3;5;7;9]; b=[2;4;6;8;10];
Resulting matrix
c=[1;2;3;4;5;6;7;8;9;10];

Best Answer

a=[1;3;5;7;9]; b=[2;4;6;8;10];
c = [a b] % concatenate. only works because a and b have the same number of rows
c = c.' % transpose
c = c(:) % reshape