Error using quad for nummerical integration
1 次查看(过去 30 天)
显示 更早的评论
I am unable to understand why i cant use the quad function for nummerical integration..
tk = 1.5;
Assymptotisk=@(x) sqrt(2/pi)*1/sqrt(x)*exp(-x);
vc= quad(Assymptotisk,tk,inf);
The above code reproduces the problem in my main program..
Thanks in advance!
0 个评论
采纳的回答
Pedro Villena
2012-10-29
this equation has a singularity to Inf
tk = 1.5;
Assymptotisk=@(x) sqrt(2/pi).*exp(-x)./sqrt(x);
vc= quad(Assymptotisk,tk,1e18);
2 个评论
Andrei Bobrov
2012-10-29
quadgk(Assymptotisk,tk,inf);
integral(Assymptotisk,tk,inf);% with MATLAB R2012a
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!