Double Integral numerically in matlab
3 ビュー (過去 30 日間)
古いコメントを表示
I am trying to solve a double integral using quadgk. t and r are values that can change so I have created a function where they are inputs.
function BF = calcBF(t, r)
B = @(x,y)(t-x-y)*(3)/(3+4*(x+y)+4*x*y)*sqrt(3)/(sqrt(3+4*(x+y))/r+(4*x*y/r.^2))
firstint = @(x)quadgk(@(y) B(x,y),0,t-x)
secondint = quadgk(@(x) firstint, 0, t)
BF = 6*secondint;
Each time I run the code however, I receive an error that "Supported classes are 'double' and 'single'" I'm sure I'm denoting something wrong within the code; however, I don't see it.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Function Creation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!