fill

From STX Wiki
Jump to navigationJump to search

Create a vector with equally spaced elements.

Usage
fill(n{, x0{, dx}})
n
vector length, a scalar (>0)
note: if n is a vector, ncol(n) is used as number of elements
x0
start value, must be a scalar (default=0)
dx
increment, must be a scalar (default=0)
Result
The result is a vector r with n elements. The elements are initialized with: ri = x0 + i * dx; i=0..n-1
See also
init, rand

<function list>

Navigation menu

Personal tools