Getting X based on table values

16 Views Asked by At

I have a table of values;

$$3.00 \mapsto 12.15$$

$$3.10 \mapsto 12.82$$

And I'd like to know an equation for getting the inbetween values.

For example:

$$3.05 \mapsto \frac{12.15 + 12.82}2$$

But I'm not sure how I'd do this, and I'm not sure of the terminology of the issue I am facing sorry if its already been asked/answered which I am sure it has.

Thanks

1

There are 1 best solutions below

7
On BEST ANSWER

As Rory said this is linear interpolation.

If you have two points $(x_1,y_1)$ and $(x_2,y_2)$ then the points in between are given by: $\left(x_1+t(x_2-x_1),y_1+t(y_2-y_1)\right)$ where $t$ is between 0 and 1 and represents what proportion of the way you are from the first point to the second.