%% Repeat Vector Elements
% Create a vector and repeat each of its elements three times into a new vector.

v = [1 2 3 4];
u = repelem(v,3)

%
% Repeat the first two elements of v twice and the last two elements three times.

u = repelem(v,[2 2 3 3])

% Copyright 2015 The MathWorks, Inc.