MATLAB: I want to combine two or more matrices but not same size, example a=[1 2] a=[1 2 3 4 5] to a=[1 2 1 2 3 4 5]

I want to combine two or more matrices but not same size, example a=[1 2] a=[1 2 3 4 5] to a=[1 2 1 2 3 4 5]

Best Answer

  • Fajar - if
    a = [1 2];
    b = [1 2 3 4 5];
    then
    c = [a b];
    should give the desired result.