设置 'Display'属性
>> options = optimset('Display','iter','Algorithm','interior-point');
>> X = fmincon(@(x) 3*sin(x(1)-0.2)+exp(x(2)-0.1),[0;0],[],[],[],[],[-1 -1],[],[],options)
First-order Norm of
Iter F-count f(x) Feasibility optimality step
0 3 3.088294e-001 0.000e+000 1.420e+000
1 6 -2.226784e+000 0.000e+000 4.191e-001 1.102e+000
2 9 -2.284223e+000 0.000e+000 1.034e-001 2.409e-001
3 12 -2.450365e+000 0.000e+000 5.979e-002 2.705e-001
4 15 -2.461244e+000 0.000e+000 1.232e-003 2.424e-002
5 18 -2.461248e+000 0.000e+000 1.001e-003 5.135e-004
6 21 -2.462843e+000 0.000e+000 2.019e-004 2.501e-003
7 24 -2.463242e+000 0.000e+000 2.124e-006 6.271e-004
8 27 -2.463246e+000 0.000e+000 2.001e-008 6.605e-006
Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the function tolerance,
and constraints were satisfied to within the default value of the constraint tolerance.
X =
-1.0000
-1.0000
>>,