Learn R Programming

matlab (version 1.0.4.1)

logspace: MATLAB logspace function

Description

Generate logarithmically spaced vectors.

Usage

logspace(a, b, n=50)

Value

Returns vector containing containing n points logarithmically spaced between decades \(10^\code{a}\) and \(10^\code{b}\). For

\(n < 2\), b is returned.

Arguments

a

numeric scalar specifying exponent for starting point

b

numeric scalar specifying exponent for ending point

n

numeric scalar specifying number of points to be generated

Author

P. Roebuck proebuck1701@gmail.com

Details

Useful for creating frequency vectors, it is a logarithmic equivalent of linspace.

See Also

linspace

Examples

Run this code
logspace(1, pi, 36)

Run the code above in your browser using DataLab