linspace {matlab}R Documentation

MATLAB linspace function

Description

Generate linearly spaced vectors.

Usage

linspace(a, b, n = 100)

Arguments

a numeric scalar specifying starting point
b numeric scalar specifying ending point
n numeric scalar specifying number of points to be generated

Details

Similar to colon operator but gives direct control over the number of points.

Value

Returns vector containing containing n points linearly spaced between a and b inclusive. If n < 2, the result will be the ending point b.

Author(s)

P. Roebuck, roebuck@mdanderson.org

See Also

logspace

Examples

linspace(1, 10, 4)

[Package matlab version 0.8-2 Index]