FUNCTION REFERENCE

logspace

Logarithmically spaced row vector.

Logarithmically spaced row vector.

Syntax

logspace(a, b)

Syntax

logspace(a, b, n)

Returns n points from 10^a to 10^b; n defaults to 50. When b equals pi, the endpoint is pi instead of 10^pi. With one point it returns the endpoint. Fractional counts round down, nonpositive counts give an empty row, and NaN counts error. Inputs must be real scalars, and the output must fit the matrix and statement limits.

Example

logspace(0,2,5)   % [1 3.162278 10 31.622777 100]

Differences from MATLAB: Complex endpoints are not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.