24小时热门版块排行榜    

查看: 2660  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 欢迎发来filecode的Mz6后的代码验证其规律 +32 医学老男孩 2026-08-13 74/3700 2026-08-16 21:05 by 医学老男孩
[基金申请] 2027广东省杰青 +3 奶牛小黑 2026-08-15 6/300 2026-08-16 20:07 by 奶牛小黑
[基金申请] 快农历七夕节了,轻松一下,男人悄悄话,女施主请不要进来。 +3 Tide man 2026-08-14 3/150 2026-08-16 17:47 by jurkat.1640
[基金申请] 哪位老哥知道今年的国自然具体哪一天放榜? +9 Ldrop2023 2026-08-13 9/450 2026-08-16 13:24 by wukun_007
[基金申请] 咱们一起用铁证分析2026国家社科基金中标与否 +7 启萌科技 2026-08-12 26/1300 2026-08-16 12:35 by 启萌科技
[精细化工] 招聘 金属平磨液,抛光液研发工程师 +3 小天0311 2026-08-14 3/150 2026-08-16 07:31 by H9PLUS
[基金申请] filecode +8 cratir 2026-08-14 12/600 2026-08-15 18:08 by zyfgau
[基金申请] 小木虫上这么多卖论文的,真有人买论文么?感觉没必要啊 +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 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
[基金申请] 分享一下我之前已中青C的计划书的filecode +4 布布和一二 2026-08-11 5/250 2026-08-13 12:56 by cratir
[基金申请] 结合人工智能,周易传统文化,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 冰心玉壶晴
[基金申请] 什么时候出结果,有咨询渠道??? +3 Tide man 2026-08-11 3/150 2026-08-11 17:54 by kudofaye
[基金申请] 确定了,国自然21号放榜 +6 布布和一二 2026-08-10 7/350 2026-08-10 19:15 by 2000zf36392
信息提示
请填处理意见