How do I interpolate the value in certain data point by array of known points?
问题 I have known data points and their values described as arrays, speed and power speed = [2, 6, 8, 10, 12] power = [200, 450, 500, 645, 820], I want to estimate the power value that corresponds to speed value (e.g. 7) that is not listed within source array (2 through 12). I.e. I am seeking a way to perform interpolation 回答1: The simplest way to do that is to perceive your power-from-speed dependency as a collection of lines and assuming your target point falls between two known points of a