24小时热门版块排行榜    

Znn3bq.jpeg
查看: 2019  |  回复: 14

dengwei_19

木虫 (著名写手)

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

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

求w,求详解!谢谢!!!
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
回帖支持 ( 显示支持度最高的前 50 名 )

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的回帖
普通回帖

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的回帖

dingd

铁杆木虫 (职业作家)

【答案】应助回帖

感谢参与,应助指数 +1
不知道你的公式是否正确,没有正确的实数解,如果右边是2.6,到有一个解:
w: -0.280599708910106
5楼2012-04-13 14:34:30
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dengwei_19

木虫 (著名写手)

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

引用回帖:
4楼: Originally posted by dbb627 at 2012-04-13 14:19:25:
>> 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* ...

x =

   81.4787

这个是解出来的w吗?
6楼2012-04-13 14:39:24
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★ ★
dengwei_19: 金币+4, ★★★★★最佳答案 2012-04-13 14:49:55
dengwei_19: 回帖置顶 2012-04-13 15:17:11
引用回帖:
6楼: Originally posted by dengwei_19 at 2012-04-13 14:39:24:
x =

   81.4787

这个是解出来的w吗?

是的,这个就是matlab求出的数值解,做图也可以看出来在80附近。
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.
7楼2012-04-13 14:43:37
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dengwei_19

木虫 (著名写手)

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

引用回帖:
7楼: Originally posted by dbb627 at 2012-04-13 14:43:37:
是的,这个就是matlab求出的数值解,做图也可以看出来在80附近。

学到很多东西 这个程序我好好看看 有不懂的语句再请教!非常感谢!!!!
8楼2012-04-13 14:49:36
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dengwei_19

木虫 (著名写手)

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

引用回帖:
7楼: Originally posted by dbb627 at 2012-04-13 14:43:37:
是的,这个就是matlab求出的数值解,做图也可以看出来在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;
x=0.1:0.1:100;
y=feval(fun,x);
plot(x,y)
[x,feval,flag]=fsolve(fun,80)
这个能详解下过程吗?
9楼2012-04-13 15:07:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dengwei_19

木虫 (著名写手)

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

引用回帖:
7楼: Originally posted by dbb627 at 2012-04-13 14:43:37:
是的,这个就是matlab求出的数值解,做图也可以看出来在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
把方程都移到一边等于函数
x=0.1:0.1:100;  从0.1到100 0.1的增长
y=feval(fun,x);
plot(x,y)
[x,feval,flag]=fsolve(fun,80)  看x为多少是函数为0 ?

基本是这样的思路?
10楼2012-04-13 15:18:58
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 dengwei_19 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考博] 湖南大学刘巧玲课题组2026年第二批次博士研究生招生信息 +3 南风观火 2026-04-18 5/250 2026-04-20 10:13 by 南风观火
[考研] 求调剂推荐 +9 小聂爱学习 2026-04-14 9/450 2026-04-19 17:03 by 中豫男
[考研] 求调剂 +6 苦命人。。。 2026-04-18 7/350 2026-04-19 16:27 by 中豫男
[论文投稿] 有没有接收比较快的sci期刊呀,最好在一个月之内的,研三孩子求毕业 20+4 之护着 2026-04-16 6/300 2026-04-19 13:00 by Aaron_zyn
[考研] 307中医考研调剂 +9 于以采蘩 2026-04-14 9/450 2026-04-19 08:41 by 烟雨流涯
[考研] 327求调剂 +27 Xxjc1107. 2026-04-13 30/1500 2026-04-19 08:22 by cuisz
[考研] 0854求调剂 +23 门路摸摸 2026-04-15 27/1350 2026-04-19 01:59 by 烟雨流涯
[考研] 300求调剂 +12 橙a777 2026-04-15 12/600 2026-04-18 23:51 by 路病情
[考研] 320求调剂 +5 深郊akm 2026-04-17 5/250 2026-04-18 19:52 by 王珺璞
[考研] 297,工科调剂? +5 河南农业大学-能 2026-04-14 5/250 2026-04-18 15:17 by Equinoxhua
[考研] 22408 312求调剂 +24 门路摸摸 2026-04-14 26/1300 2026-04-18 13:04 by wunaiy88
[考研] 收到复试调剂但是去不了 +8 小蜗牛* 2026-04-16 8/400 2026-04-18 11:15 by zixin2025
[考研] 一志愿华中农业071010,320求调剂 +17 困困困困坤坤 2026-04-14 19/950 2026-04-17 20:08 by 关一盏灯cd
[考研] 322求调剂 +6 tekuzu 2026-04-17 6/300 2026-04-17 13:48 by Espannnnnol
[考研] 297,工科调剂?河南农业大学本科 +14 河南农业大学-能 2026-04-14 14/700 2026-04-16 14:41 by dingyanbo1
[基金申请] RY:中国产出的科学垃圾论文,绝对数量和比例都世界第一 +7 zju2000 2026-04-14 18/900 2026-04-16 11:36 by 欢乐颂叶蓁
[考研] 求调剂学校 +14 不会吃肉 2026-04-13 16/800 2026-04-15 21:59 by noqvsozv
[考研] 一志愿A区211,22408 321求调剂 +6 随心所欲☆ 2026-04-15 7/350 2026-04-15 21:45 by lbsjt
[考研] 297工科调剂? +14 河南农业大学-能 2026-04-13 15/750 2026-04-15 13:25 by 黑科技矿业
[考研] 考研调剂 +13 长弓傲 2026-04-13 14/700 2026-04-14 14:44 by zs92450
信息提示
请填处理意见