node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org ยป

linspace

linspace

An implementation of MATLAB's linspace function.

install

npm install linspace

require

> var linspace = require('linspace');

use

linspace(from, to, length)

Acts like linspace from matlab:

> linspace(1,5,15)
[ 1,
  1.2857142857142856,
  1.5714285714285712,
  1.8571428571428568,
  2.1428571428571423,
  2.428571428571428,
  2.7142857142857135,
  2.999999999999999,
  3.2857142857142847,
  3.5714285714285703,
  3.857142857142856,
  4.1428571428571415,
  4.428571428571427,
  4.714285714285713,
  4.999999999999998 ]

license

MIT/X11