Interpolation method that does not add unnecessary extremums

后端 未结 3 1659
梦毁少年i
梦毁少年i 2020-12-20 01:50

This question is half programming but also half mathematics. I want to interpolate a set of points by a curve without adding unnecessary extremums staying \"close to the lin

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-20 02:55

    Have you tried a quadratic spline instead - though I am not convinced that will help. Another fudge option is to add additional data-points very close to your maximums. e.g. at (-0.05,4) and (1.95, -6) - this would cause the cubic spline algorithm to flatten those areas near the maximum. Depends what you are trying to achieve. There are techniques to constrain maximum and minimum of cubic splines but I am not familiar enough with those or python / matplotlib to help, sorry!

提交回复
热议问题