Multiple piecewise linear fitting equation extraction

6 ビュー (過去 30 日間)
Naser Khan
Naser Khan 2021 年 8 月 4 日
コメント済み: Naser Khan 2021 年 8 月 4 日
Hello,
I am trying to obtain a linear curve fitting equation at every falling edge (or rising edge if fliped) of a long sorted (descending/ascending if fliped) power duration curve. From some research, piecewise linear fitting seems to be one solution, however, I couldn't find any tool in Matlab to get equations for severla chunks of a curve.
Is there an easier way to obtain these equation other than manully doing it using the curve fitting toolbox in the matlab?
PS: With reference to the attached image, whats needed is an equation for the curve between falling edges (chunks).
Thanks,

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 8 月 4 日
Yes, it is viable. There are a few discussions in MATLAB community how to do such regressions. Here is one of them: https://www.mathworks.com/matlabcentral/answers/264701-piecewise-non-linear-curve-fitting-for-a-specific-type-of-data
And here is a code in published in MATLAB Central on piecewise linear fit: https://www.mathworks.com/matlabcentral/fileexchange/40913-piecewise-linear-least-square-fit
  1 件のコメント
Naser Khan
Naser Khan 2021 年 8 月 4 日
thanks for the message, I have managed to fit the curve well. However, this tool still doesnt provide function after every falling edge.
Many thanks

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

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by