LINSPACE

Purpose:

Create a series of N equally spaced values from lo to hi inclusive.

Syntax:

LINSPACE(lo, hi, n)

lo

-

Optional. A real, the start range. Defaults to 0.0.

hi

-

Optional. A real, the end range. Defaults to 1.0.

n

-

Optional. An integer, the number of samples. Defaults to 100.

Returns:

A series of N equally spaced values.

Example:

linspace(1, 5, 5)

 

returns {1, 2, 3, 4, 5}

Example:

W1: cos(linspace(-pi, pi, 1000))

W2: gcos(1000, 2*pi/(999), 1/(2*pi), -pi);setxoffset(-pi)

 

W1 == W2 within the machine precision

Remarks:

The DELTAX values of the resulting series is (hi-lo)/(n-1) and the XOFFSET is set to lo.

See Also:

.. (Range Specifier)

GLINE

LOGSPACE