![matlab interp1 matlab interp1](https://www.mathworks.com/help/examples/matlab/win64/InterpolationWithoutSpecifyingPointsExample_01.png)
P = Described in table lookup terms, the table is tab = and interp1 looks up the elements of xi in x, and, based upon their locations, returns values yi interpolated within the elements of y.Įxamples Here are two vectors representing the census years from 1900 to 1990 and the corresponding United States population in millions of people.
![matlab interp1 matlab interp1](https://www.mathworks.com/help/examples/matlab/win64/DataInterpolationComparisonExample_01.png)
Interpolation is the same operation as table lookup. This is shown below, along with the relationship between vectors x, Y, xi, and yi.
![matlab interp1 matlab interp1](http://matrix.etseq.urv.es/manuals/matlab/techdoc/ref/part011g.gif)
It finds values of a one-dimensional function f(x) underlying the data at intermediate points. The interp1 command interpolates between data points. For faster interpolation when x is equally spaced, use the methods '* linear', '* cubic', '* nearest', or '* spline'.