フィルターのクリア

How do I constrain a custom model to go through a certain point at a certain slope?

1 回表示 (過去 30 日間)
Quinn Tai
Quinn Tai 2017 年 8 月 1 日
編集済み: Veda Upadhye 2017 年 8 月 8 日
I currently have two functions that I am trying to combine into a piecewise continuous function. The left side fits the data very well, so I want to have the right side's fit begin where the left side leaves off. For simplicity sake, let's call this point x. This means I want right_f(x) = left_f(x) and right_f'(x) = left_f'(x).
How do I go about doing this? For what it's worth, the function I'm fitting is of the form f(x)=A/(1+exp(-B*(x-C)))+D on both the left and right sides.

回答 (1 件)

Veda Upadhye
Veda Upadhye 2017 年 8 月 8 日
編集済み: Veda Upadhye 2017 年 8 月 8 日
Hi Quinn,
There is a MathWorks blog post which talks about a few ways to constrain a polynomial to go through certain points. It includes some example code and you may customize your code accordingly.
Here is the link to it:
https://blogs.mathworks.com/pick/2015/12/11/polynomial-fit-passing-through-specified-points/
Hope this helps,
Veda

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by