24小时热门版块排行榜    

查看: 2659  |  回复: 1

qs001

新虫 (初入文坛)

[求助] fsolve计算结果问题

计算结果感觉误差好大,是由于初值取值造成的影响吗,还是要设置option来控制精度,第一次使用matlab一窍不通,请大家帮忙看下。
                                       First-Order                    Norm of
Iteration  Func-count    Residual       optimality      Lambda           step
     0           8         39.2026       1.13e+003         0.01
     1          16      0.00103045           0.705        0.001       0.294456
     2          24    3.55079e-005          0.0727       0.0001       0.237055
     3          32    7.28141e-006            0.19       1e-005       0.144512
     4          40    2.91808e-006          0.0123       1e-006      0.0248491
     5          48    2.90763e-006       3.58e-007       1e-007    0.000338087
     6          56    2.90763e-006       1.02e-009       1e-008   1.90914e-006

Equation solved, fsolve stalled.

fsolve stopped because the relative size of the current step is less than the
default value of the step size tolerance and the vector of function values
is near zero as measured by the selected value of the function tolerance.




y =

   -2.2413    2.2083   -0.1310    0.1318    1.0596    0.0211   -0.0272


fval =

    0.0000
    0.0008
   -0.0008
    0.0003
    0.0000
    0.0000
   -0.0011
    0.0006


下面是我要解的方程组
function F=myfun(x)
b=1;a=1;
F=[-0.0575*x(3)/a-x(7)*a*0.5-x(6);
x(3)/a^2+x(4)+17.39*x(7)*log(a)+0.8695652174*b*log(a);
-x(1)/(x(5)^2)-x(2)+x(3)/(x(5)^2)+x(4)-92.49880554*x(7)*log(x(5))+0.8695652174*b*log(x(5));
0.0065*x(1)/x(5)-0.0026*x(2)*x(5)-0.0575*x(3)/x(5)+x(7)*x(5)*((0.7-0.4*log(x(5)))/1.4-0.9347826087);
-2*x(1)/(x(5)^2)+109.8901099*x(7)-b;
2*x(1)/(1.5^2)-109.8901099*x(7)-b;
0.444444444444444*x(1)/a^2+x(2)+109.8901099*x(7)*log(1.5*a);
-x(1)*log(1.5*a/x(5))+0.5*(1.5^2*a^2-x(5)^2)*x(2)-x(3)*log(x(5)/a)+0.5*(x(5)^2-a^2)*x(4)+17.39130435*x(7)*(0.5*x(5)^2*(log(x(5))+0.5)-0.5*a^2*(log(a)+0.5))+109.8901099*x(7)*(0.5*1.5*1.5*a^2*(0.5+log(1.5*a))-0.5*x(5)^2*(log(x(5))+0.5))+0.0209742*1.5^2*a^2*b+0.8695652174*b*(0.5*x(5)^2*(log(x(5))+0.5)-0.5*a^2*(log(a)+0.5))];

选取的初值是x0=[-2,2,-0.5,0.5,1.05,0.01,-0.01]
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

nono2009

超级版主 (文学泰斗)

No gains, no pains.

优秀区长优秀区长优秀区长优秀区长优秀版主

【答案】应助回帖

★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
qs001: 金币+5, 有帮助 2013-01-08 20:44:22
xiegangmai: 金币+1, 谢谢建议 2013-01-08 21:06:39
建议楼主采用 format long(双精度)再试试
2楼2013-01-07 14:23:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 qs001 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[论文投稿] 岩土工程学报什么时候才能终审完呐 25+3 yeager111 2026-08-10 4/200 2026-08-16 20:42 by tfang
[基金申请] 2027广东省杰青 +3 奶牛小黑 2026-08-15 6/300 2026-08-16 20:07 by 奶牛小黑
[基金申请] 我的国基提前知道中了,可是同事的操作让我实在接受不了,怎么会有这样的人 +11 家与远方 2026-08-10 16/800 2026-08-16 10:28 by ray43
[基金申请] filecode=后面第一个是大写字母 +6 wangze12014 2026-08-14 7/350 2026-08-15 20:12 by gltch
[基金申请] 小木虫上这么多卖论文的,真有人买论文么?感觉没必要啊 +12 Tide man 2026-08-10 13/650 2026-08-15 16:34 by 氺木
[基金申请] 关于Filecode分析方法 +10 majunge000 2026-08-10 13/650 2026-08-15 12:26 by hanpeng972
[基金申请] 各位道友,我要去昆明玩几天,回来见。 +7 Tide man 2026-08-14 8/400 2026-08-15 01:11 by arzu_hma
[基金申请] 是这周出结果还是下周出结果? +4 yuleib84 2026-08-11 4/200 2026-08-14 23:05 by lfy8008
[基金申请] 奇怪,两个人的filecode固定段从头到尾一模一样 +8 布布和一二 2026-08-10 11/550 2026-08-14 14:58 by Equinoxhua
[硕博家园] 读博的好处 +4 lnee 2026-08-11 4/200 2026-08-14 10:20 by ahsoarli
[基金申请] filecode +15 documentary 2026-08-10 17/850 2026-08-14 10:08 by kissu88
[基金申请] 静等基金结果 +8 gjjjzhong 2026-08-10 21/1050 2026-08-13 17:56 by 且听虎啸
[基金申请] 重要来源:本周末出结果 +10 瞬息宇宙 2026-08-12 10/500 2026-08-13 15:46 by likettle
[基金申请] Filecode 又变了,巨变 +3 WH3796 2026-08-12 4/200 2026-08-13 14:13 by 小木虫6752397
[基金申请] 结合人工智能,周易传统文化,filecode打分制来了,3分以上希望很大。 +3 Tide man 2026-08-12 4/200 2026-08-13 08:35 by ZJTJZ
[基金申请] 2019年青年基金涵评意见,大家看看几个A,几个B? +11 Tide man 2026-08-11 11/550 2026-08-13 07:35 by 撸猫猫
[基金申请] 帮忙看看fileCode +7 wwncly 2026-08-10 13/650 2026-08-11 19:36 by 冰心玉壶晴
[基金申请] 为什么网上很多人说本周 12号出结果 +6 瞬息宇宙 2026-08-10 7/350 2026-08-11 19:25 by Tide man
[基金申请] 确定了,国自然21号放榜 +6 布布和一二 2026-08-10 7/350 2026-08-10 19:15 by 2000zf36392
[基金申请] 国自然结果 +4 Vierhys 2026-08-10 8/400 2026-08-10 15:06 by Vierhys
信息提示
请填处理意见