|
|
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);
* O% r H+ u0 K# @ & l+ N! {' B# G- N4 L: e
8 f+ p9 P7 X% |: I% [* k) K7 b
$ a; ~" a0 M/ j$ J3 P6 k
运行后的提示文字如下:
) f' ? `& R: d6 ?) N/ B1 F9 l* K" n. ?& M i
Local minimum found.
' t+ |' u; z$ } K6 s- H7 z
, W) W" H2 }0 X8 JOptimization completed because the size of the gradient is less than
, ]( J% P2 A0 pthe default value of the optimality tolerance.
+ W$ u( m% }- b. Q3 [4 J
* i0 I+ i- s- s- N* {! @ P<stopping criteria details>
; q5 K* }7 g$ f9 a* f
d! x4 s$ ?% R# r- f0 ]
/ _+ i. G+ q5 r' ^8 t% B. Zans =) E) O: O& s4 |; \$ T) d7 h
! V& p4 V: q$ D; Z+ L# G
0.5898 0.0000" Y* A5 S ^! W( W4 w( `
) M4 d, P [- E
如何让上述提示文字在命令栏中消失呢?请教大神,非常感谢!
8 \0 B( _8 b- @3 e/ x+ h |
|