I would like to fit data series that describe inefficiencies in a system. This however requires me to only use plots that don’t go over 1.00 in the given region. Can I somehow add a constraint to the fitting to achieve this?
For example: what if I want the best fifth order polynomial fit that never goes above 1.00 in the region of [-24.0, +24.0]?
Here is a quick dataset example with a pol3 fit. The way I want it to be fitted though is using a fit that never goes above 1 or under 0.99 between [-24.0, 24.0].
of course a simple pol3 will “go above 1” … you need to define your own function that doesn’t. Also it is not clear what you mean by “never goes above 1”… How the function should be on the intervals without data points ? undefined ? content equal to 1 ? 0 ? … you can also limit the range of the function and use pol3 … there is many ways…
I want to extrapolate from this data for the interval, that has no data points, but I also want to make sure to keep it under 1.0. I’m okay with it if its exactly 1.0 at 24.0 or at -24.0 and goes above then, but not inside this region.
My problem is not about lack of knowledge about the basics of the framework. My question was, what is the way to include constraints in the definition the way I already described.