MATLAB: Vector operations

operationsvector

I'm looking for something that can repeat a vector without. For exemple, here a is repeated 4 times :
a = [1,2,5];
b = cellfun(a, 4);
b = [1 1 1 1 2 2 2 2 5 5 5 5];
thx

Best Answer

One way:
a = [1,2,5];
b = reshape(repmat(a,4,1),12,1);