Home > Back-end > How to obtain the corresponding value by interpolation
How to obtain the corresponding value by interpolation
Time:02-24
There are two list A and b, a is increasing array, take out an a [I], [I] will correspond to a b, excuse me, if a value m, a, [I] CodePudding user response:
assert (a [I + 1)!=a [I]); Float t=(m - a [I])/(a + 1] [I - a [I]); Float n=b [I] * 1.0 f (t) + b * t [I + 1];