MATLAB: How can i combine two different matrics with different size become one matric that fixed size

combine matric

according to my question how can i combine two different matrics with different size become one matric that fixed size ex :
A = [1,2,3,4,5]
B = [1,2,3,4,5,6,7,8]
becoming one matric that fixed size 1×15
C = [1,2,3,4,5,1,2,3,4,5,6,7,8,0,0]
or
A = [1,2,3,4,5]
B = [1,2,3,4,5,6,7,8,9,10]
becoming one matric that fixed size 1×15
C = [1,2,3,4,5,1,2,3,4,5,6,7,8,9,10]

Best Answer

C=zeros(1,15);
C(1:numel(A)+numel(B))=[A B]