MATLAB: Combine two Matrix in one column

combine matrix

Hi
i have two matrix A6*3 and B6*3
i want to combine all elements in one column but it must be sorted like the first element is A(1,1) then A(1,2) till A(6,3) then come all the elements from Matrix B
L=[A(1,1);A(1,2);A(1,3);A(2,1)…….A(6,3);B(1,1);……..B(6,3)];
thanks

Best Answer

L = [reshape(A',[numel(A),1]);reshape(B',[numel(B),1])]