# trig_interp

trig_interp, a MATLAB code which evaluates the trigonometric interpolant to a set of evenly spaced data.

Given data at 2N+1 equally spaced points x(i), which we may assume are samples of a function f(x), the trigonometric interpolant has the form

```        q(x) = a0 + sum ( 1 <= i <= N) a(i) cos(i*x)
+ sum ( 1 <= i <= N) b(i) sin(i*x)
```

### Languages:

trig_interp is available in a MATLAB version.

### Reference:

Anthony Austin, Lloyd Trefethen,
Trigonometric interpolation and quadrature at perturbed points,
SIAM Journal on Numerical Analysis,
Volume 55, Number 5, pages 2113-2122, 2017.

### Related Data and Programs:

divdif, a MATLAB code which uses divided differences to interpolate data.

hermite_interpolant, a MATLAB code which computes the Hermite interpolant, a polynomial that matches function values and derivatives.

interp, a MATLAB code which can be used for parameterizing and interpolating data;

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

rbf_interp_1d, a MATLAB code which defines and evaluates radial basis function (RBF) interpolants to 1D data.

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

spline, a MATLAB code which computes functions that approximate or interpolate data.

test_approx, a MATLAB code which defines a number of test problems for approximation and interpolation.

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

test_interp_1d, a MATLAB code which defines test problems for interpolation of data y(x), depending on a 1D argument.

vandermonde_interp_1d, a MATLAB code which finds a polynomial interpolant to data by setting up and solving a linear system involving the Vandermonde matrix.

### Source Code:

• chebyspace.m, returns Chebyshev-spaced points in an interval.
• trig_cardinal.m, evaluates a trigonometic cardinal function.
• trig_cardinal.m, evaluates a trigonometic Lagrange polynomial.
• trig_interp_cardinal.m, evaluates the trigonometic interpolant to evenly spaced data using cardinal trigonometric functions.
• trig_interp_lagrange.m, evaluates the trigonometic interpolant to arbitrarily spaced data using Lagrange trigonometric polynomials.

Last revised on 28 August 2019.