linspace

Returns a slice with evenly spaced numbers over an interval.

linspace
(
E = double
)
(,,
size_t num = 50
)

Parameters

start E

value of the first element

stop E

value of the last element

num size_t

number of points in the interval (default = 50)

Return Value

Type: auto

slice with evenly spaced numbers over an interval

Examples

assert(linspace(1, 2, 3) == [1.0, 1.5, 2.0]);

Meta