Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

logspace

Log-linearly Spaced Sequences


Description

Generate log-linearly spaced sequences.

Usage

logspace(x1, x2, n = 50)
  logseq(x1, x2, n = 100)

Arguments

x1

numeric scalar specifying starting point

x2

numeric scalar specifying ending point

n

numeric scalar specifying number of points to be generated

Details

These functions will generate logarithmically resp. exponentially spaced points between x1 and x2 resp. 10^x1 and 10^x2.

If n < 2, the result will be the ending point x2. For logspace(), if x2 = pi, the endpoint will be pi and not 10^pi!

Value

vector containing n points between x1 and x2 inclusive.

See Also

Examples

logspace(1, pi, 36)
logseq(0.05, 1, 20)

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.