Is it possible to partition a curve and fit it using different funtions

1 view (last 30 days)
Just for curiosity, is it possible to partition curve into different sections and then fit each of these section using liner and nonlinear functions? Asked another way or another question: Is it possible to use both linear and nonlinear functions at the same time on one curve?

Answers (1)

John D'Errico
John D'Errico on 25 Jun 2018
Edited: John D'Errico on 25 Jun 2018
Yes. If you know what you are doing. But that means you need to learn about how to use piecewise functions. You need to learn about ideas like splines. Learn how to enforce continuity, which will depend on the exact functional form of those segments.
So, yes, it is certainly possible. But the caveat is, you need to understand the mathematics of tools like splines, the mathematics of modeling, as well as a sufficient knowledge of MATLAB.
If not, well you can certainly take only the data in some region, use it to fit one function, then independently, fit another function in a separate region, assuming you have sufficient data. But if you want the segments to be continuous or even differentiable? Well, then you need to learn how to solve that problem. This is classically done all the time in a variety of ways using splines. So do some reading.
But, no, there is no simple tool that will do all the work and all the thinking for you in ANY language, especially if the functional segments are fully generally nonlinear, etc.

Community Treasure Hunt

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

Start Hunting!