I would like to generate a continuous number with repetitive increment, for example,from 1 to 3. with a repetitive increment of 1 (x 5). so the output will be.
output =
[1
1
1
1
2
2
2
2
2
3
3
3
3
3]
five repetition of 1, then five repetition of 2 and so on.
I tried this code:
a = [1:1:3]
for i = a(:,1:end)
disp(i+zeros(5,1))
end
I got the same result, however, I can't put the output in one column. Thanks for the help.