linspace

fun linspace(start: Int, stop: Int, num: Int = 50, endpoint: Boolean = true): List<Double>
fun linspace(range: IntRange, num: Int = 50, endpoint: Boolean = true): List<Double>
fun linspace(start: Double, stop: Double, num: Int = 50, endpoint: Boolean = true): List<Double>

A simple implementation of linspace() found in python Returns evenly spaced values within a given interval start, stop

Return

a list of the values

Parameters

start

the starting value. Must be less than stop

stop

the stopping value. Must be greater than start

num

the number of points in the interval. Defaults to 50

endpoint

if true the end point (stop) is included in the interval. Defaults to true.