linspace function

Implementation of the linspace Function from Matlab

Implementation of the linspace Function from Matlab

Creates a vector of n elements equally spaced apart.

linspace(a, b, n = 100)

Arguments

  • a: initial number
  • b: final number
  • n: number of elements (integer >= 2)

Returns

vector of numbers from a to b with n linearly spaced apart

Examples

linspace(0,100, 20)
  • Maintainer: John Harrold
  • License: BSD_2_clause + file LICENSE
  • Last published: 2025-01-07