フィルターのクリア

Error using quad for nummerical integration

1 回表示 (過去 30 日間)
DoVile Last Name:
DoVile Last Name: 2012 年 10 月 29 日
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!

採用された回答

Pedro Villena
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 件のコメント
DoVile Last Name:
DoVile Last Name: 2012 年 10 月 29 日
You were right, i looked at my problem again and it turns out i was using the wrong function :)
Thanks
Andrei Bobrov
Andrei Bobrov 2012 年 10 月 29 日
quadgk(Assymptotisk,tk,inf);
integral(Assymptotisk,tk,inf);% with MATLAB R2012a

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by