logspace

Returns a slice with numbers evenly spaced over a log scale.

In linear space, the sequence starts at base ^^ start (base to the power of start) and ends with base ^^ stop.

logspace
(
E = double
)
(,,
size_t num = 50
,
E base = 10
)

Parameters

start E

base ^^ start is the value of the first element

stop E

base ^^ stop is the value of the last element

num size_t

number of points in the interval (default = 50)

base E

the base of the log space (default = 10)

Return Value

Type: auto

slice with numbers evenly spaced over a log scale

Examples

assert(logspace(1, 2, 3, 10) == [10. ^^ 1.0, 10. ^^ 1.5, 10. ^^ 2.0]);

Meta