我对编程很新,并且认为我会尝试编写线性插值函数.
说我给出的数据如下:
x = [1, 2.5, 3.4, 5.8, 6] y = [2, 4, 5.8, 4.3, 4]
我想设计一个函数,它将使用Python在1和2.5之间,2.5到3.4之间线性插值,依此类推.
我试过通过Python教程,但我仍然无法理解它.
python interpolation linear-interpolation
interpolation ×1
linear-interpolation ×1
python ×1