|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
缺少解8 @: K# O1 b0 L, m1 N' @4 t
% {: _6 G# ]2 U+ ^! J& f- 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$ r; Q* c/ w% y4 E
. d. S2 O1 k% C4 H0 n
[color=rgb(51, 102, 153) !important]复制代码
- y" _: U3 N7 Q# T- %显示
- 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
- >>
& T; P) o; V( e% p0 h2 A. u+ k
; ^( G+ E: {" G8 ]& I" k. s7 k t[color=rgb(51, 102, 153) !important]复制代码
. X& h$ k, W1 n* ^: Y( F其中x 的解只是其中的一个,另一个为什么没有显示?
; U* e0 i0 I/ H! X3 d2 d# Q, ` |
|