|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
缺少解4 Y0 Q0 e/ _0 w% R v/ ?7 B6 o
% @0 S# x4 l* i- function[x,fval,exitflag]=fsolveDemo1
- x0=[0,0,0];
- options=optimset('MaxFunEvals',0,'MaxIter',3);
- [x,fval,exitflag]=fsolve(@f,x0);
- function F =f(x)
- F=[x(1)/4-x(2)/4; x(2)/4-(x(3)-2)/-2; x(1)^2+x(2)^2-4];
- end
- end: t Y2 F7 l8 \' J0 `9 ]5 A/ T
* N$ s, U3 e+ z
[color=rgb(51, 102, 153) !important]复制代码* F6 [, P$ L3 a. Y( h
- %显示
- Equation solved.
- fsolve completed because the vector of function values is near zero
- as measured by the default value of the function tolerance, and
- the problem appears regular as measured by the gradient.
- <stopping criteria details>
- x =
- 1.4142 1.4142 1.2929
- fval =
- 1.0e-08 *
- 0
- 0.0000
- 0.3873
- exitflag =
- 1
- >> 2-1.414/2
- ans =
- 1.2930
- >>0 n7 F1 ]2 O1 T3 O+ D5 N z
4 h( Y( ?2 i8 a2 f
[color=rgb(51, 102, 153) !important]复制代码' x9 s2 E! Z* d# a' b* _* `) k4 Z/ e
其中x 的解只是其中的一个,另一个为什么没有显示?
q$ V7 ?. w8 o* z9 W* j |
|