How to put limit on coefficient produced by polyfit in MATLAB?
Ältere Kommentare anzeigen
Hello,
So what I am trying to do is plot some experimental data along with a second order polynomial fit (Ax^2 + Bx + C), the coefficients of which are determined using polyfit. The problem I am having is that I do not want the first term, in this case A to be negative. Is there any way I can put constraints on this A term so that it does not go below zero?
Any help would be appreciated.
1 Kommentar
ali asakereh
am 20 Feb. 2022
Bearbeitet: ali asakereh
am 20 Feb. 2022
Hi Anna,
did you find the answer?
Antworten (1)
Wayne King
am 31 Jul. 2013
0 Stimmen
There are routines on the file exchange like this one:
If you have the Optimization Toolbox, see
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!