- 注册时间
- 2010-10-22
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 2292
- 在线时间
- 小时
|
发表于 2010-12-3 18:13:43
|
显示全部楼层
我在matlab中试了下(迭代法),没有验证:- function f=myfun(x)
- f1=simplify(cos(x(1))*cos(x(2))*cos(x(3))+sin(x(1))*sin(x(2))*sin(x(3)));
- f2=simplify(sin(x(1))*cos(x(2))*cos(x(3))-cos(x(1))*sin(x(2))*sin(x(3))-1/(sqrt(3)));
- f3=simplify(cos(x(1))*cos(x(2))*sin(x(3))-sin(x(1))*sin(x(2))*cos(x(3))-1/(sqrt(3)));
- f4=simplify(cos(x(1))*sin(x(2))*cos(x(3))+sin(x(1))*cos(x(2))*sin(x(3))-1/(sqrt(3)));
- f=[f1;f2;f3;f4];
-
- >> x0=[0,0,0,0];
- >> options=optimset('Display','iter');
- >> [x,fval]=fsolve(@myfun,x0,options)
-
- Norm of First-order Trust-region
- Iteration Func-count f(x) step optimality radius
- 0 5 2 0.577 1
- 1 10 0.960761 1 0.485 1
- 2 15 0.324333 0.611866 0.328 2.5
- 3 20 0.0224783 0.551607 0.102 2.5
- 4 25 0.00117694 0.125984 0.0284 2.5
- 5 30 6.97003e-005 0.0296358 0.00605 2.5
- 6 35 4.17129e-006 0.00685761 0.00172 2.5
- 7 40 2.51666e-007 0.00175693 0.000366 2.5
- 8 45 1.51932e-008 0.000411554 0.000104 2.5
- 9 50 9.17664e-010 0.000106008 2.21e-005 2.5
- 10 55 5.54288e-011 2.48499e-005 6.27e-006 2.5
- 11 60 3.34811e-012 6.40288e-006 1.33e-006 2.5
- 12 65 2.02239e-013 1.501e-006 3.79e-007 2.5
-
- 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.0172 -0.3649 1.0172 0
-
-
- fval =
-
- 1.0e-006 *
-
- 0.4467
- -0.0211
- -0.0212
- 0.0423
复制代码 |
|