chickadee » matrix-utils » make-linspace

make-linspace:procedure

Given procedures MAKE-VECTOR and FILL-MATRIX!, returns a procedure LINSPACE of the form LINSPACE:: N * BASE * LIMIT -> V

Where LINSPACE returns a row vector with N linearly spaced elements between BASE and LIMIT. The number of elements, N, must be greater than 1. The BASE and LIMIT are always included in the range. If BASE is greater than LIMIT, the elements are stored in decreasing order.

MAKE-VECTOR is one of the homogeneous vector creation procedures from SRFI-4, and FILL-MATRIX! is a procedure created by MAKE-FILL-MATRIX, above. FILL-MATRIX! must operate on the same type of vector as MAKE-VECTOR.