LINSPACE Function
Generates an array of evenly spaced numbers.
enabled.
Usage
result = = LINSPACE(dims, start, incr)
Input Parameters
dims—A vector of dimensions for the result array.
start—A scalar start value for the evenly spaced numbers.
incr—A scalar increment between the evenly spaced numbers.
Returned Value
result—An array of dimensions dims of evenly spaced numbers starting with start and incrementing by incr. Its datatype is the same as that of the higher-ranking of the datatypes of start and incr. For more information on the rules of data type promotion, refer to Chapter 2 of the PV‑WAVE Programmer’s Guide.
Keywords
None.
Discussion
If start=0 and incr=1 then it is computationally more efficient to use one of the *INDGEN functions. For evenly spaced points in a fixed interval, use the INTERPOL function.
Example
PM, LINSPACE([2, 3], -1, 0.5)
; PV-WAVE prints:
;      -1.00000      0.000000       1.00000
;     -0.500000      0.500000       1.50000