pwl_approx_1d, an Octave code which defines and evaluates a piecewise linear function, using NC "control points", which approximates a set of ND data points (x(i),y(i)).
The test code needs access to the test_interp_1d() library.
The computer code and data files described and made available on this web page are distributed under the MIT license
pwl_approx_1d is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version.
bernstein_polynomial, an Octave code which evaluates the Bernstein polynomials, useful for uniform approximation of functions;
pwl_interp_1d, an Octave code which interpolates a set of data using a piecewise linear function.
test_interp, an Octave code which defines a number of test problems for interpolation, provided as a set of (x,y) data.
test_interp_1d, an Octave code which defines test problems for interpolation of data y(x), depending on a 2D argument.