|
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);" Q6 S1 ]+ K y y2 a, R
6 l8 u; {, R8 V4 x5 R% S3 ]+ y
: \9 A8 X6 ~' w: }1 g+ ]% i; v9 p+ A6 \( d) {
运行后的提示文字如下:# H8 p, k/ F, A9 V
$ S- Z, H I- f6 L2 BLocal minimum found.
/ ]% y3 _: ?7 _; w1 a9 Q" c2 o r0 B4 [! A4 z
Optimization completed because the size of the gradient is less than8 D. F* {. w* Y$ a/ q0 c/ V$ a) g
the default value of the optimality tolerance.
2 a! s7 s& k t; v1 O
7 x- ~0 n& j- P% a* q% V1 N<stopping criteria details>& |% t/ e& d0 f6 ~' @. O/ B- ?0 o1 @0 D, x
9 v) t! g# R9 R- |: R9 z6 ]2 H: B- h) k6 s; H: O/ u1 ?
ans =) Q+ Q F% A6 W/ A) m
$ b, k9 P3 T, ]0 L& Z 0.5898 0.00004 q8 K' `4 z3 H% l; |
( U2 x- i8 |: R+ L6 c
如何让上述提示文字在命令栏中消失呢?请教大神,非常感谢!
1 Y7 }8 Y M) i0 j: `! T |
|