converting non-linear function to multiple linear functions

Hello
I need to convert a non-linear function to multiple linear functions with "ax+b" format so then i can use one of them according to the amount of x and calculate the output of original function with an acceptable approximation. is there any things that do this with optimum number of equations automatically? i tried curve fitting app but i couldn't find such a thing.
thanks

4 件のコメント

Walter Roberson
Walter Roberson 2019 年 6 月 6 日
Are you looking to create a piecewise linear approximation to a non-linear function ?
Mehrdad
Mehrdad 2019 年 6 月 6 日
Yes, exactly. i didn,t know the right expression for this. thank you about it.
now can you help with this?
Walter Roberson
Walter Roberson 2019 年 6 月 6 日
https://www.mathworks.com/matlabcentral/answers/340002-piecewise-polynomial-fitting-for-data
https://www.mathworks.com/help/curvefit/smoothing-splines.html
https://blogs.mathworks.com/loren/2008/08/25/piecewise-linear-interpolation/
Mehrdad
Mehrdad 2019 年 6 月 6 日
Thank you so much.

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

回答 (1 件)

PIYUSH AGGARWAL
PIYUSH AGGARWAL 2019 年 6 月 6 日

0 投票

Hi,
Try the examples for factorizing polynomial using factor method on documentation page
Hope this works for you :)

1 件のコメント

Walter Roberson
Walter Roberson 2019 年 6 月 6 日
This has an unrelated purpose. The user has a nonlinear function that they want to approximate in sections with straight lines.

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

カテゴリ

ヘルプ センター および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

製品

質問済み:

2019 年 6 月 5 日

コメント済み:

2019 年 6 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by