|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
代码如下:- fun=@(x)x(1)^2-2*x(1)+1+x(2)^2+x(1)^4+2*x(1)^2*x(2)^2+x(2)^4;
- x0=[0 0];
- fminunc(fun,x0);$ z! _. z! _. o: A5 B5 q2 @
3 L' H7 M& I! C& L
9 b/ ]6 {$ p {. M D- ^7 ^
5 Z- T! g S! g运行后的提示文字如下:
6 c* ?6 b5 D/ n) z
6 \0 L# ]; a; f7 gLocal minimum found.
9 Z, E+ Y; D+ w" {5 R4 O$ N F
# r: J- ^. n" m0 B& wOptimization completed because the size of the gradient is less than5 \# v- T9 X4 U# l0 @
the default value of the optimality tolerance.+ G% i+ E! _( e- ]
7 X6 ]# t2 B+ L
<stopping criteria details>6 H: F+ h' f8 |5 ^
# A4 t& I7 s `0 b6 [! P
! J8 j% O: a( V' B4 ?: I% s1 ]ans =# X* \/ ?, \; G1 m
6 R7 S1 O: M, r4 R3 w 0.5898 0.00007 E! Z5 D: @0 ^1 i
0 \( C7 b, j" X0 G1 R; v, r
如何让上述提示文字在命令栏中消失呢?请教大神,非常感谢!
5 v' S% g# T+ n; F0 M7 G |
|