Skip to contents

Creates a vector of n elements logarithmically spaced apart.

Usage

logspace(a, b, n = 100)

Arguments

a

initial number

b

final number

n

number of elements (integer >=2)

Value

vector of numbers from a to b with n logarithmically (base 10) spaced apart

Examples

logspace(-2, 3,20)
#>  [1] 1.000000e-02 1.832981e-02 3.359818e-02 6.158482e-02 1.128838e-01
#>  [6] 2.069138e-01 3.792690e-01 6.951928e-01 1.274275e+00 2.335721e+00
#> [11] 4.281332e+00 7.847600e+00 1.438450e+01 2.636651e+01 4.832930e+01
#> [16] 8.858668e+01 1.623777e+02 2.976351e+02 5.455595e+02 1.000000e+03