Interpolation over an array (or two)

后端 未结 8 650
闹比i
闹比i 2020-12-10 15:27

I\'m looking for a java library or some help to write my own interpolation function. That is I have two arrays of doubles which are potentially different sizes, but are ord

8条回答
  •  没有蜡笔的小新
    2020-12-10 16:21

    You need to get the x-values corresponding to the y-values. Otherwise no algorithm will be able to determine whether [1, 16, 81] is x^2 for [1, 4, 9] or x^4 for [1, 2, 3]. Would you interpolate six values or none?

    And then, when you're given the x-values, you can use some sort of interpolation (linear, kubic spline, you name it) to approximate the missing values.

提交回复
热议问题