24小时热门版块排行榜    

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

哈哈噢

新虫 (初入文坛)

[求助] 求助:改变变量的数值为什么结果就计算不出来了???

开始:
>> x1=1;
>> x2=0.1;
>> syms y1 y2;
>> t=1/2.*(1-sqrt(x1.*x2)/pi.*int(int(exp(-(y1-1)^2.*x1-(y2-1)^2.*x2).*log2(1+exp(-4.*y1.*x1-4.*y2.*x2)),y1,-inf,inf),y2,-inf,inf));
Warning: Explicit integral could not be found.  
Warning: Explicit integral could not be found.  
>> digits(3)
>> vpa(t)

ans =

0.376


将x2从0.1变成0.2就计算不出结果来了


>> x1=1;
>> x2=0.2;
>> syms y1 y2;
>> t=1/2.*(1-sqrt(x1.*x2)/pi.*int(int(exp(-(y1-1)^2.*x1-(y2-1)^2.*x2).*log2(1+exp(-4.*y1.*x1-4.*y2.*x2)),y1,-inf,inf),y2,-inf,inf));
Warning: Explicit integral could not be found.  
Warning: Explicit integral could not be found.  
>> digits(3)
>> vpa(t)

ans =

0.5 - 0.0712*numeric::int(numeric::int(log(1/exp(4*y1 + (4*y2)/5) + 1)/(exp((y1 - 1)^2 + (y2 - 1)^2/5)*log(2)), y1 = -Inf..Inf), y2 = -Inf..Inf)


求高人指点这是什么情况???

该怎么改程序才能让x2为任意值时都能得到具体的结果???
多谢了
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★ ★
感谢参与,应助指数 +1
臭水沟: 金币+2, 谢谢交流~~ 2012-04-12 11:48:42
哈哈噢: 金币+2, ★★★★★最佳答案, 多谢提示,会找点关于积分发散的资料看看 2012-04-12 14:44:07
有可能你的积分值不收敛是发散的,x2为任意值时都能得到具体的结果,有时候不是能实现的
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.
3楼2012-04-12 09:45:19
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 哈哈噢 的主题更新
信息提示
请填处理意见