24小时热门版块排行榜    

CyRhmU.jpeg
查看: 3217  |  回复: 11
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

xinq1858

金虫 (正式写手)

[求助] 求高人指点用matlab求解非线性方程组,解决了追加100金币;

现在用matlab求解一组非线性方程组,遇到如下问题:
No solution found.

fsolve stopped because the relative size of the current step is less than the
default value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the default value of the function tolerance.
具体原因如下:
fsolve stopped because the relative norm of the current step, 5.967422e-013, is less than
max(options.TolX^2,eps) = 1.000000e-012. However, the sum of squared function values,
r = 3.231949e+045, exceeds sqrt(options.TolFun) = 1.000000e-003.

Optimization Metric                                               Options
relative norm(step) =  5.97e-013                max(TolX^2,eps) =  1e-012 (default)
r =  3.23e+045                                    sqrt(TolFun) = 1.0e-003 (default)
我想修改默认值,请高手指点。谢谢。
回复此楼
一切皆有可能
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖


xinq1858(金币+2): 2011-11-04 20:38:28
jjdg(金币+1): 感谢参与 2011-11-04 23:39:44
多维非线性方程组求解初值很重要,很多时候初值选不好是不会收敛的,也就是无法求出解。而且多维非线性方程组也有可能有多组解。因此可以随机生成初始值 。
用optionset可以修改设置
opt=optimset('TolFun',value)
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
4楼2011-11-03 23:56:00
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 12 个回答

dingd

铁杆木虫 (职业作家)

【答案】应助回帖


xinq1858(金币+1): 积极参与 2011-11-03 21:05:19
jjdg(金币+1): 感谢参与 2011-11-04 23:39:52
可能的话最好将方程组贴出来。
2楼2011-11-03 20:36:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xinq1858

金虫 (正式写手)

引用回帖:
2楼: Originally posted by dingd at 2011-11-03 20:36:48:
可能的话最好将方程组贴出来。

你只需要告诉我怎么处理我提出来的问题就好了,呵呵,感激中。
一切皆有可能
3楼2011-11-03 21:04:52
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

libralibra

至尊木虫 (著名写手)

骠骑将军

【答案】应助回帖


xinq1858(金币+1): 2011-11-04 20:38:36
jjdg(金币+1): 感谢参与 2011-11-04 23:39:37
贴方程和你的代码,
matlab/VB/python/c++/Java写程序请发QQ邮件:790404545@qq.com
5楼2011-11-04 01:42:14
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见