logspace: MATLAB logspace function

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/logspace.R

Description

Generate logarithmically spaced vectors.

Usage

1
logspace(a, b, n=50)

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

Details

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

Value

Returns vector containing containing n points logarithmically spaced between decades 10^\code{a} and 10^\code{b}. For n < 2, b is returned.

Author(s)

P. Roebuck [email protected]

See Also

linspace

Examples

1
logspace(1, pi, 36)

Example output

Attaching package: 'matlab'

The following object is masked from 'package:stats':

    reshape

The following objects are masked from 'package:utils':

    find, fix

The following object is masked from 'package:base':

    sum

 [1] 10.000000  9.674596  9.359781  9.055211  8.760551  8.475479  8.199684
 [8]  7.932863  7.674725  7.424987  7.183375  6.949625  6.723482  6.504697
[15]  6.293032  6.088255  5.890141  5.698473  5.513043  5.333646  5.160088
[22]  4.992176  4.829729  4.672568  4.520521  4.373422  4.231109  4.093427
[29]  3.960225  3.831358  3.706684  3.586067  3.469376  3.356481  3.247260
[36]  3.141593

matlab documentation built on May 30, 2017, 6:57 a.m.