24小时热门版块排行榜    

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

dengwei_19

木虫 (著名写手)

铁齿金不换诚实可靠小郎君

[求助] 现在做到高斯函数的误差函数一步,又是一个方程不知道用matlab怎么写

求w,求详解!谢谢!!!
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)


dengwei_19: 回帖置顶 2012-04-13 15:38:54
引用回帖:
9楼: Originally posted by dengwei_19 at 2012-04-13 15:07:09:
>>  fun=@(x)-5.4*(pi^(1/2)*erf(10*2^0.5./x))/2-2.8*(pi^(1/2)*erf(40*2^0.5./x))/2+2.6;
x=0.1:0.1:100;
y=feval(fun,x);
plot(x,y)
=fsolve(fun,80)
这个能详解下过程吗?

fun=@(x)-5.4*(pi^(1/2)*erf(10*2^0.5./x))/2-2.8*(pi^(1/2)*erf(40*2^0.5./x))/2+2.6;
这个是将你的积分方程式转为误差函数,-(pi^(1/2)*erf(10*2^0.5./x))/2(pi^(1/2)*erf(40*2^0.5./x))/2,是你的两个积分
w(即x)的解使得fun=0
x=0.1:0.1:100;
y=feval(fun,x);
plot(x,y)
这个是w(即x)在0到100之间变化时fun的取值,用来在做图猜测w大概在什么位置,fun=0
[x,feval,flag]=fsolve(fun,80)是用来求精确数值解

x解即w
feval 取x的值 fun的函数值越接近0越好
flag 判断解的情况
1  FSOLVE converged to a root.
      2  Change in X too small.
      3  Change in residual norm too small.
      4  Computed search direction too small.
      0  Too many function evaluations or iterations.
     -1  Stopped by output/plot function.
     -2  Converged to a point that is not a root.
     -3  Trust region radius too small (Trust-region-dogleg) or
         Regularization parameter too large (Levenberg-Marquardt).
     -4  Line search failed.

» 本帖已获得的红花(最新10朵)

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.
11楼2012-04-13 15:23:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 15 个回答

onesupeng

金虫 (职业作家)

【答案】应助回帖

感谢参与,应助指数 +1
这个matlab有点悬吧?我觉得自己编程序算恐怕更好呢
长期招收博士生,参见http://fsl-unsw.com
2楼2012-04-13 13:47:46
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dengwei_19

木虫 (著名写手)

铁齿金不换诚实可靠小郎君

引用回帖:
2楼: Originally posted by onesupeng at 2012-04-13 13:47:46:
这个matlab有点悬吧?我觉得自己编程序算恐怕更好呢

不会吧。。。。。没办法求吗?
3楼2012-04-13 13:53:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
dengwei_19: 金币+6, ★★★很有帮助 2012-04-13 14:36:22
dengwei_19: 回帖置顶 2012-04-13 15:40:01
>> syms x
>> syms w;int(exp(-x^2),0,w)

ans =

(pi^(1/2)*erf(w))/2

>> syms w;int(exp(-x^2),0,-w)

ans =

-(pi^(1/2)*erf(w))/2
===========
>> fun=@(x)-5.4*(pi^(1/2)*erf(10*2^0.5./x))/2-2.8*(pi^(1/2)*erf(40*2^0.5./x))/2+2.6;
>> x=0.1:0.1:100;
>> y=feval(fun,x);
>> plot(x,y)
>> [x,feval,flag]=fsolve(fun,80)

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.




x =

   81.4787


feval =

-9.0775e-010


flag =

     1

» 本帖已获得的红花(最新10朵)

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楼2012-04-13 14:19:25
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[公派出国] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 ero8OE6tv9cu 2026-09-02 4/200 2026-09-03 03:14 by rM1TE0WVDIIY
[基金申请] 为什么资助数各大高校都创新高,自己申请怎么就这么难 +14 Kittylucky 2026-08-27 15/750 2026-09-02 19:35 by liumei0601
[基金申请] 科研人应该花精力去思考如何解决问题,而不是去凝练问题 +7 瞬息宇宙 2026-09-01 14/700 2026-09-02 17:33 by ma0526
[基金申请] 要骂人了,新模版改版就是要淡化问题凝练这种虚的东西,结果有个评委还在说凝练得不够 +9 瞬息宇宙 2026-08-31 17/850 2026-09-02 14:04 by anjeeshine
[基金申请] 基金系统什么内容也没有 30+4 winsaint 2026-08-27 10/500 2026-09-02 11:35 by 大不刘6
[基金申请] 学科评审组评审是指会评吗? +5 瞬息宇宙 2026-08-31 5/250 2026-09-02 10:13 by 雨冰共舞
[基金申请] 面上函评意见出来了,像什么等级? 20+4 Tsingking1 2026-08-27 17/850 2026-09-01 19:51 by 超级无敌华子
[论文投稿] 小白求助 投论文要求的highlights应该如何写 5+3 l1963982152 2026-08-29 4/200 2026-09-01 09:04 by 北京莱茵编辑
[基金申请] 麻烦专家们看看评委们的意见(F口面上) +7 gdd2018 2026-08-28 12/600 2026-09-01 08:32 by 尼古拉斯小虫
[基金申请] 国社科又开始会评了,不知道这次命运如何 +7 雨打竹帘 2026-08-30 11/550 2026-08-31 23:16 by hittle2008
[基金申请] 基金未中,这种答复是模板吗? +6 zhaosm1982 2026-08-27 7/350 2026-08-31 21:18 by qdxxmc
[基金申请] 面上意见出来了 +12 黄鸟于飞Chao 2026-08-29 23/1150 2026-08-31 18:57 by 黄鸟于飞Chao
[基金申请] 能否申诉? +7 echo8914667 2026-08-30 8/400 2026-08-31 17:00 by yihongxu
[基金申请] 中青基了要发朋友圈吗? +7 349506619 2026-08-28 7/350 2026-08-31 13:39 by 冼亮淀粉酶
[基金申请] 29号明天会评吗 +4 笨笨唐 2026-08-28 4/200 2026-08-31 09:30 by huixian257
[基金申请] 为什么到现在没收到通知? +5 tannykie 2026-08-29 5/250 2026-08-30 21:05 by purplejack
[基金申请] 有没有仍没收到信息的 +7 德尚中行 2026-08-27 8/400 2026-08-30 20:52 by purplejack
[考博] 找导师 +6 yuanjiabao 2026-08-29 7/350 2026-08-30 14:40 by 生科新手
[基金申请] 我就是申请一个面上项目而已,这评审意见是按照杰青的条件评的吧? +6 gouxfjh 2026-08-28 11/550 2026-08-30 07:57 by gouxfjh
[基金申请] 国自然评审意见 +13 wangmingqi 2026-08-28 19/950 2026-08-29 10:22 by Poppy1104
信息提示
请填处理意见