indices/
mg_makerange.pro
includes main-level programRoutines
top mg_makerange
result = mg_makerange(startValue, stopValue [, increment=float] [, n=long] [, count=long])
Create an array ranging from the startValue
and stopping before the
stopValue
.
Return value
Parameters
- startValue in required type=float
first value of the output array
- stopValue in required type=float
largest possible value for the last value of the output array
Keywords
- increment in optional type=float default=1.0
- n in optional type=long
number of elements in the output array; if not set, it is calculated from
INCREMENT
- count out optional type=long
set to a named variable to return the number of elements in the returned array, i.e.,
N
ifN
is used
Examples
See the examples in the main-level program at the end of this file:
IDL> print, mg_makerange(0, 10)
0.0000000 1.0000000 2.0000000 3.0000000
4.0000000 5.0000000 6.0000000 7.0000000
8.0000000 9.0000000 10.0000000
IDL> print, mg_makerange(0, 10, n=5)
0.0000000 2.5000000 5.0000000 7.5000000
10.0000000
IDL> print, mg_makerange(0, 10, increment=0.5)
0.0000000 0.5000000 1.0000000 1.5000000
2.0000000 2.5000000 3.0000000 3.5000000
4.0000000 4.5000000 5.0000000 5.5000000
6.0000000 6.5000000 7.0000000 7.5000000
8.0000000 8.5000000 9.0000000 9.5000000
10.0000000
File attributes
Modification date: | Wed May 14 15:07:14 2014 |
Lines: | 17 |
Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.