idllib

Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

indices/

mg_makerange.pro

includes main-level program

top source 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

fltarr

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

if N is not set, then INCREMENT is used to compute N

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 if N 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 Sep 14 12:53:40 2011
Lines: 67
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.