DADiSP Worksheet Functions > Function Categories > Generated Series > GNUMBER
Generates a series consisting of a range of numbers.
GNUMBER(start, end, increment)
start |
- |
A real. Starting value for the range. |
end |
- |
A real. Ending value for the range. |
increment |
- |
Optional. A real. Step size for the range. Defaults to 1.0. |
A series.
gnumber(1, 5)
returns a series {1, 2, 3, 4, 5}
gnumber(1, 5, .8)
returns a series {1, 1.8, 2.6, 3.4, 4.2, 5}. This is equivalent to 1..0.8..5.
gnumber(start, end, inc) can be implemented as:
gline(int((end-start)/inc)+1, 1, inc, start)