# TEST_INTERP_FUN Interpolation Tests Based on Functions

TEST_INTERP_FUN, a MATLAB library which provides the values of certain functions that are useful for testing an interpolation algorithm using a varying number of points.

The related packages TEST_INTERP and TEST_APPROX provide discrete data sets of (x,y) pairs. However, when the convergence rate of an interpolation process is of interest, it is important to be able to sample an underlying but "unknown" function at an increasing number of points. This library provides a few functions which are known to cause problems for certain kinds of interpolation schemes.

The problems available include:

1. Runge example, f(x) = 1 / ( x * x + 1 ), [-5,5], p01_plot.png;
2. Bernstein example, f(x) = abs ( x ), [-1,1], p02_plot.png;
3. The Step function, p03_plot.png;
4. The Doppler function, p04_plot.png;
5. The Rabbit Ears function, p05_plot.png;

### Languages:

TEST_INTERP_FUN is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.

### Related Data and Programs:

CHEBYSHEV, a MATLAB library which computes the Chebyshev interpolant/approximant to a given function over an interval.

DIVDIF, a MATLAB library which includes many routines to construct and evaluate divided difference interpolants.

INTERP, a MATLAB library which can be used for parameterizing and interpolating data;

LAGRANGE_INTERP_1D, a MATLAB library which defines and evaluates the Lagrange polynomial p(x) which interpolates a set of data, so that p(x(i)) = y(i).

RBF_INTERP, a MATLAB library which defines and evaluates radial basis interpolants to multidimensional data.

SHEPARD_INTERP_1D, a MATLAB library which defines and evaluates Shepard interpolants to 1D data, which are based on inverse distance weighting.

SPLINE, a MATLAB library which includes many routines to construct and evaluate spline interpolants and approximants.

TEST_APPROX, a MATLAB library which defines test problems for approximation, provided as a set of (x,y) data.

TEST_INTERP, a MATLAB library which defines a number of test problems for interpolation, provided as a set of (x,y) data.

VANDERMONDE_INTERP_1D, a MATLAB library which finds a polynomial interpolant to a function of 1D data by setting up and solving a linear system for the polynomial coefficients, involving the Vandermonde matrix.

### Reference:

1. Samuel Conte, Carl deBoor,
Elementary Numerical Analysis,
Second Edition,
McGraw Hill, 1972,
ISBN: 07-012446-4,
LC: QA297.C65.
2. Carl deBoor,
A Practical Guide to Splines,
Springer, 2001,
ISBN: 0387953663,
LC: QA1.A647.v27.

### Source Code:

• p00_fun.m evaluates the function for any problem.
• p00_lim.m returns the limits of the approximation interval for any problem.
• p00_plot.m creates a plot of any problem.
• p00_prob_num.m returns the number of problems.
• p00_story.m prints the "story" for any problem.
• p00_title.m returns the title of any problem.
• p01_fun.m evaluates the function for problem 1.
• p01_lim.m returns the limits of the approximation interval for problem 1.
• p01_story.m prints the "story" for problem 1.
• p01_title.m returns the title of problem 1.
• p02_fun.m evaluates the function for problem 2.
• p02_lim.m returns the limits of the approximation interval for problem 2.
• p02_story.m prints the "story" for problem 2.
• p02_title.m returns the title of problem 2.
• p03_fun.m evaluates the function for problem 3.
• p03_lim.m returns the limits of the approximation interval for problem 3.
• p03_story.m prints the "story" for problem 3.
• p03_title.m returns the title of problem 3.
• p04_fun.m evaluates the function for problem 4.
• p04_lim.m returns the limits of the approximation interval for problem 4.
• p04_story.m prints the "story" for problem 4.
• p04_title.m returns the title of problem 4.
• p05_fun.m evaluates the function for problem 5.
• p05_lim.m returns the limits of the approximation interval for problem 5.
• p05_story.m prints the "story" for problem 5.
• p05_title.m returns the title of problem 5.
• timestamp.m prints the current YMDHMS date as a time stamp.

Last revised on 29 March 2019.