MATLAB: Repeat an element in a vector

repeatvector

Hi all,
I have one vector and i wish to repeat the first element of the vector once at the very beginning.
For example:
n = [1 2 3 4 5 6 7 8 9]
to
n = [1 1 2 3 4 5 6 7 8 9]
Thank you all.

Best Answer

[n(1) n]
or
[repmat(n(1),1) n]