It is an easy job if the gap between the first number and the last is a multiple of the step size; however, I want to do it in more general cases.
For example, if I want to generate a seris starting from 1 until 45 while the value increases by 4 each time.
In matlab, we can type 1:4:45 and it gives [1 5 9 ... 41 45]; If I write 2:4:45, it will give [2 6 10 ... 42].
I know I can write a loop in SAS, but it could be increase the computation time dramatically. Is there an easier way to do it?
Thanks.