|
"Anand Anand" <tranand3@gmail.com> wrote in message <i8965m$3rb$1@fred.mathworks.com>...
> I am trying to fit a cubic monotonic polymonial between say certain data values of variable G and corresponding variables for B. My objective function was
> f=sum(G-a(1)+a(2)*B+a(3)*B.^2+a(4)*B.^3;);
> and the non linear inequality constraints for monotonicity were like
> a(3).^2-3*a(2)*a(4)<0;
> and a(4)>0 which is -a(4)<0;
> Is that all?
> Nevertheless, I get a monotonic function but it is so different from the one obtained in the technical paper I am working on.any suggestions?
- - - - - - -
The constraints a(3).^2-3*a(2)*a(4)<0 and a(4)>0 are requirements that your polynomial be strictly monotone increasing over its enter range from minus infinity to plus infinity. That is a much stricter constraint than merely being monotone increasing over the actual range spanned by the B variable. Are you sure you need such a tight constraint on your polynomial?
There are at most three values of B at which you need to check for the minimum value of the derivative, a(2)+2*a(3)*B+3*a(4)*B^2, of your polynomial: 1) at the minimum value of B, 2) at the maximum value of B, and 3) at the value B = -a(3)/(3*a(4)) if that is within the B range. If each of these three derivative values is positive, then the polynomial is strictly monotone increasing over the entire B range.
Roger Stafford
|