[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Reverse interpolation?
- From: Simon de Vet <simon(at)mathstat.dal.ca>
- Date: Wed, 16 Aug 2000 10:55:50 -0400
- Newsgroups: comp.lang.idl-pvwave
- Organization: ISINet, Nova Scotia
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20884
I have a little problem :)
I have three sets of data - a list of altitudes (which are not evenly
spaced, and are calculated with a long, confusing formula), an altitude
I want to match, and a set of data that depends on altitude (ie: entry 1
corresponds to altitude 1, entry 2 to altitude 2, etc...).
Currently, I am calculating the differences between each entry in the
altitude list and my known altitude, and using this to find the closest
match, who's subscript I use in the data array. However, since there
aren't very many values in my altitude list, the closest matches are
often not very close at all, and the results become inaccurate.
I want to get better results. Instead of finding that entry #5 is the
closest match to my known altitude, and using #5 as the subscript in my
data array, I'd like to find that, based on a linear interpolation,
entry #5.32850 is an exact match, and using this value in an
interpolation on my data array.
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?
Thanks. I hope this isn't too confusing. I'm having a bad brane day.