fspan
Creates an array of evenly-spaced floating point numbers.
Prototype
function fspan ( start [1] : numeric, finish [1] : numeric, num [1] : integer ) return_val [num] : float
Arguments
startValue at which to start.
finishValue at which to end.
numNumber of equally-spaced points desired between start and finish.
Description
fspan returns a 1D array with num equally-spaced points from start to finish, inclusive.
If start or finish are of type double, both start and finish are promoted to type double. If start or finish are of any other numeric type, both start and finish are promoted to type float.
See Also
Examples
In the example below, note that the integers 0 and 100 will be coerced to the type float, as required by the fspan function.
x = fspan(0, 100, 11) ; x = (/0., 10., ... , 90., 100./) (11 values) mlon = 128 dlon = 360. / mlon lon = fspan (0, (mlon - 1) * dlon, mlon) ; lon = (/0, 2.8125, ... , 357.1875/)