I need to figure out a way to linearly interpolate a set of values.
I have several sets of data where the independant variables are different and the array size is different. I need to convert all of these data sets into a standard type. For example
I have this data set in columns 1 & 2:
-17.3..... -.4
-15 ........ -.3
-11.6 ..... -.39
-10 ....... -.82
-9 ........ -.76
-8.3 ..... -.71
-7.2 ..... -.65
-6 ...... -.57
..
and I need it to be of the form:
-14 .... X
-13 .... X
-12 .... X
-11 .... X
-10 .. -.82 (some of the values match up, so they need no interpolation)
-9 .... -.76
-8 ...... X
I need to fill in the X's. I guess I need to store the value -14 then search for the gap that it fits in the top table, then do some math gymnastics then spit out the interpolated value. then do the same for -13, -12... and so on. I think I'm trying to make this too difficult because I'm struggling with the implementation of it.
Bookmarks