Equana

Docs/Arrays/linspace
Back to Arrays

linspace

Create an array of evenly spaced values.

Syntax

linspace(start, stop, n) → Array of n evenly spaced values from start to stop

Backends

TypeScript

Description

Create an array of evenly spaced values.

Parameters

NameDescription
startStart value
stopStop value
nNumber of points

Returns

Array of n evenly spaced values from start to stop

Examples

Try It
>> linspace(0, 1, 5)
[0, 0.25, 0.5, 0.75, 1]

See Also