MATLAB: How to make a vector of 30 rows 1 column with increasing values of elements

matrices

I want to make a matrix of 30 rows 1 column like [1;1;1;1;1;2;2;2;2;2;3;3;3;3;3;4;4;4;4;4;5;5;5;5;5;6;6;6;6;6] please anyone help.

Best Answer

This works:
V1 = 1:6;
M = repmat(V1', 1, 5)';
V2 = M(:) % Output Vector