Extrapolation using MATLAB

Extrapolation is the method of identifying the value outside the given bound.

we can use interp1 function to extrapolate

Let us take the following example


X
Y
2
66
3
69
4
80
5
87
6
65


In the MATLAB X and Y shall be defined as follows

x=2:6
y=[66 ,69 , 80, 87, 65]

Using extrapolation let us find the value at x=9 as follows

interp1(x,y,9,'linear','extrap')

we get answer as -1




Comments