How to constraint the second derivative value while fitting polynomial to set of data

5 ビュー (過去 30 日間)
deRicaud
deRicaud 2018 年 7 月 2 日
コメント済み: deRicaud 2018 年 7 月 2 日
Hello all,
I hope somebody can help me, knowing that I am not an expert in matlab.
Here is my problem: I need to match a polynomial of order n to a set of points (x,y). I know that the found curve has no physical meaning if the second order derivative is higher than 0 or that its sign changes (inflexions). So, I want to constraint the second order derivative of the polynomial to be always negative (not only at the ends).
I am currently using polyfit, which does not offer this option. I have found many articles on this website abount constraints on derivative, ends, but not second derivative on the entire set of points.
Basically, I want to find something always like the green curve (picture below), and not the yellow one, with a 5 order polynomial, for example.
Thank you in advance for your help.
Gaëtan.

回答 (1 件)

Matt J
Matt J 2018 年 7 月 2 日
編集済み: Matt J 2018 年 7 月 2 日
This FEX package has that capability,
See the 'concavedown' input option.
  1 件のコメント
deRicaud
deRicaud 2018 年 7 月 2 日
thanks, that's a nice tool! Howerver I'm a bit afraid of the complexity of it, knowing I need to run it hundreds of time in my code, and also that I might have issue explaining why I use Hermite spline. But thanks, I will dig into it to see how it is built, to see if I can find an easy way to do the concavedown.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by