24小时热门版块排行榜    

CyRhmU.jpeg
查看: 1414  |  回复: 3

哈哈噢

新虫 (初入文坛)

[求助] 求助关于matlab求对数积分的问题

对图片中的公式用matlab仿真,能求出具体数值来吗?还是结果中也带着log2?
想得到具体的数值有没有办法?
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

哈哈噢

新虫 (初入文坛)

2楼2012-04-06 16:48:11
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
哈哈噢: 金币+5, ★★★★★最佳答案 2012-04-06 17:31:30
xiegangmai: 金币+2, 谢谢应助! 2012-04-11 22:39:46
0.4937

>> t=int(exp(-(x-1).^2).*log2(1+exp(-4*x)),x,-inf,inf)
Warning: Explicit integral could not be found.  

t =

int(log(1/exp(4*x) + 1)/(exp((x - 1)^2)*log(2)), x = -Inf..Inf)

>> vpa(t)

ans =

0.49371420056718206609671433486689

>> F=@(x)exp(-(x-1).^2).*log2(1+exp(-4*x));
Q1=quadgk(F,0,inf)
Q2=quadgk(F,-inf,0)
Q3=quadgk(F,-150,0)

Q1 =

    0.1705

Warning: Infinite or Not-a-Number value encountered.
> In quadgk>vadapt at 290
  In quadgk at 216

Q2 =

   NaN


Q3 =

    0.3232

>> Q1+Q3

ans =

    0.4937

>>
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-06 17:14:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

哈哈噢

新虫 (初入文坛)

引用回帖:
3楼: Originally posted by dbb627 at 2012-04-06 17:14:31:
0.4937

>> t=int(exp(-(x-1).^2).*log2(1+exp(-4*x)),x,-inf,inf)
Warning: Explicit integral could not be found.  

t =

int(log(1/exp(4*x) + 1)/(exp((x - 1)^2)*log(2)), x = -Inf..Inf)
...

想问一下,vpa能在m文件里用吗?可以的话怎么用?
vpa(t)还是t=vpa(t),不过好像都运行不出来
4楼2012-04-11 16:58:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 哈哈噢 的主题更新
信息提示
请填处理意见