[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reverse interpolation?
I'd recommend checking out VALUE_LOCATE function. Overall, solving the
proportion in a triangle will be the simpliest approach (unless you want
to do a more sophisticated spline as suggested by Martin), but
VALUE_LOCATE eliminates the need for subtracting and finding near-zero
elements of the array.
Also, once you have X, there is a library function INTERPOL that will
take X for input and locate the interpolated value for you.
Simon de Vet wrote:
> Simon de Vet wrote:
> > I understand how to use a subscript to find an interpolated value. How
> > would I go in the opposite direction, using a value to find a subscript?
> I have an idea (I used this for a similar problem with Matlab) that may
> work. It's ackward and bulky, but I can understand it.
> First, I subtract the known altitude from the altitude list. Some of the
> values will be positive, and some negative. I use this to find the points
> on either side of known altitude. I can use their subscripts as x-values
> and their altitudes as y-values to find the equation of a line connecting
> the two points. I can then substitute my known altitude (y value) into the
> equation, and solve for x (the required subscript).
> I hope it works.