Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Help on double integral
조회 수: 1 (최근 30일)
이전 댓글 표시
I wrote a simple code for evaluating a double integral of a function of the following but it does n't work;
R = 0.0067; D = 1.1111;
f = inline('exp(-R*(y-x))*((((y+D)/(x+D)))^(R*(K+D)+1))*(1/((y+D)*y)))','x','y');
dblquad(f,0,100,100,inf)
Any with a solution? Thanks for your time
댓글 수: 1
답변 (1개)
Walter Roberson
2012년 3월 5일
The above cannot be integrated, as it involves the undefined variable K .
댓글 수: 4
Mike Hosea
2012년 3월 8일
Your integral function must be able to accept arrays and return arrays. Don't use *, as this is matrix multiply. Instead use .*, elementwise multiplication. Similarly, don't use ^, rather .^. Don't use /, rather ./ . Basically, your integrand isn't working because it is being passed arrays, and it's trying to do matrix multiplications, matrix powers, and linear system solves when what you really just want is simple arithmetic, elementy-by-element.
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!