how to integral2?
2 ビュー (過去 30 日間)
古いコメントを表示
how can i integral a function which was written in matlab but there is wrong , i dont no where it is :
syms tau
syms y
f= @(y,tau)y*exp(-0.5.*y.^2/ tau)
expecty=integral2(f, -2,4,0,Inf,'auto')
0 件のコメント
採用された回答
Birdman
2018 年 3 月 16 日
integral2 is defined for function handle, therefore you do not need symbolic variables:
f= @(y,tau)y.*exp(-0.5.*y.^2./ tau)
expecty=integral2(f, -2,4,0,Inf,'auto')
6 件のコメント
Torsten
2018 年 3 月 16 日
Neglecting numerical aspects like division by 0, your integral is +Inf.
Best wishes
Torsten.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!