Current location - Training Enrollment Network - Mathematics courses - Solving unconstrained nonlinear problems with matlab or lingo
Solving unconstrained nonlinear problems with matlab or lingo
Using matlab to solve unconstrained nonlinear problems can be solved by fminunc () function. Solution:

x0=[ 1.3 107? 1.332 19 ? 0.24839];

[x,fval] = fminunc(@(x) myfunc(x),x0)

Running result

x = 1.323? 1.3393 ? 0.24964

fval =? - 13.958

Main contents of myfunc(x) function:

What if? x 1+2*x 1^2+x2+2*x2^2+x3>; 10 | x 1+x 1^2+x2+x2^2-x3>; 50 | 2*x 1+x 1^2+2*x2+x3>; 40 | x 1^2+x3==2 | x 1+2 * x2 & lt; 1

f = inf

other

=-(2*x 1+3*x 1^2+3*x2+x2^2+x3);

end