5.4: Multidimensional Interpolation
- Page ID
- 96057
Suppose we are interpolating the value of a function of two variables,
\[z=f(x, y) \nonumber \]
The known values are given by
\[z_{i j}=f\left(x_{i}, y_{j}\right) \nonumber \]
with \(i=0,1, \ldots, n\) and \(j=0,1, \ldots, n\). Note that the \((x, y)\) points at which \(f(x, y)\) are known lie on a grid in the \(x-y\) plane.
Let \(z=g(x, y)\) be the interpolating function, satisfying \(z_{i j}=g\left(x_{i}, y_{j}\right) .\) A twodimensional interpolation to find the value of \(g\) at the point \((x, y)\) may be done by first performing \(n+1\) one-dimensional interpolations in \(y\) to find the value of \(g\) at the \(n+1\) points \(\left(x_{0}, y\right),\left(x_{1}, y\right), \ldots,\left(x_{n}, y\right)\), followed by a single one-dimensional interpolation in \(x\) to find the value of \(g\) at \((x, y)\).
In other words, two-dimensional interpolation on a grid of dimension \((n+1) \times\) \((n+1)\) is done by first performing \(n+1\) one-dimensional interpolations to the value \(y\) followed by a single one-dimensional interpolation to the value \(x\). Twodimensional interpolation can be generalized to higher dimensions. The MATLAB functions to perform two-and three-dimensional interpolation are interp2.m and interp3.m.