**nearest_interp_1d_test**,
a MATLAB code which
calls nearest_interp_1d(), which
interpolates a set of data using a piecewise constant interpolant
defined by the nearest neighbor criterion.

nearest_interp_1d, a MATLAB code which interpolates a set of data using a piecewise constant interpolant defined by the nearest neighbor criterion.

- nearest_interp_1d_test.m, calls all the tests;
- nearest_interp_1d_test.sh, runs all the tests;
- nearest_interp_1d_test.txt, the output file.

- nearest_interp_1d_test01.m, evaluates the interpolant at some sample points.
- nearest_interp_1d_test02.m, tests plots a piecewise linear interpolant to the original data, and the nearest neighbor interpolant.

**nearest_interp_1d_test01()** plots a piecewise linear interpolant to
the original data, and the nearest neighbor interpolant.

- p01_data.png, a plot of the data and piecewise linear interpolant for problem p01;
- p01_nearest.png, a plot of the nearest neighbor interpolant for problem p01;
- p02_data.png, a plot of the data and piecewise linear interpolant for problem p02;
- p02_nearest.png, a plot of the nearest neighbor interpolant for problem p02;
- p03_data.png, a plot of the data and piecewise linear interpolant for problem p03;
- p03_nearest.png, a plot of the nearest neighbor interpolant for problem p03;
- p04_data.png, a plot of the data and piecewise linear interpolant for problem p04;
- p04_nearest.png, a plot of the nearest neighbor interpolant for problem p04;
- p05_data.png, a plot of the data and piecewise linear interpolant for problem p05;
- p05_nearest.png, a plot of the nearest neighbor interpolant for problem p05;
- p06_data.png, a plot of the data and piecewise linear interpolant for problem p06;
- p06_nearest.png, a plot of the nearest neighbor interpolant for problem p06;
- p07_data.png, a plot of the data and piecewise linear interpolant for problem p07;
- p07_nearest.png, a plot of the nearest neighbor interpolant for problem p07;
- p08_data.png, a plot of the data and piecewise linear interpolant for problem p08;
- p08_nearest.png, a plot of the nearest neighbor interpolant for problem p08;