0% found this document useful (0 votes)
17 views2 pages

Run

The document describes the use of the fmincon solver from the Optimization Toolbox to find a constrained minimum of a smooth objective function with a unique minimum at x* = [-5, -5] and f(x*) = -250. It outlines the iterative process and results of the optimization, indicating that the local minimum satisfies the constraints. The final output includes the optimal solution and function value after several iterations.

Uploaded by

milad.gholamifar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Run

The document describes the use of the fmincon solver from the Optimization Toolbox to find a constrained minimum of a smooth objective function with a unique minimum at x* = [-5, -5] and f(x*) = -250. It outlines the iterative process and results of the optimization, indicating that the local minimum satisfies the constraints. The final output includes the optimal solution and function value after several iterations.

Uploaded by

milad.gholamifar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Run fmincon on a Smooth Objective Function

The objective function is smooth (twice continuously differentiable). Solve the optimization
problem using the Optimization Toolbox fmincon solver. fmincon finds a constrained minimum
of a function of several variables. This function has a unique minimum at the point x* = [-5,-
5] where it has a value f(x*) = -250.
Set options to return iterative display.
Get
options = optimoptions(@fmincon,'Algorithm','interior-point','Display','iter');
[Xop,Fop] = fmincon(Objfcn,X0,[],[],[],[],LB,UB,[],options)
First-order Norm of
Iter F-count f(x) Feasibility optimality step
0 3 -1.062500e+01 0.000e+00 2.004e+01
1 6 -1.578420e+02 0.000e+00 5.478e+01 6.734e+00
2 9 -2.491310e+02 0.000e+00 6.672e+01 1.236e+00
3 12 -2.497554e+02 0.000e+00 2.397e-01 6.310e-03
4 15 -2.499986e+02 0.000e+00 5.065e-02 8.016e-03
5 18 -2.499996e+02 0.000e+00 9.708e-05 3.367e-05
6 21 -2.500000e+02 0.000e+00 1.513e-04 6.867e-06
7 24 -2.500000e+02 0.000e+00 1.161e-06 6.920e-08

Local minimum found that satisfies the constraints.

Optimization completed because the objective function is non-decreasing in


feasible directions, to within the value of the optimality tolerance,
and constraints are satisfied to within the value of the constraint tolerance.
Xop = 1×2

-5.0000 -5.0000
Fop =
-250.0000
Get
figure(fig);
hold on;

You might also like