Geting error while using quadgk for quadruple integral
이전 댓글 표시
I am trying to evaluate quadruple integral using quadgk. It is giving me error even with just one integral. I am pasting the code below
a = 1;
b = 1;
r = 20;
intgrl = quadgk(@(theta1)quadgk(@(theta2)quadgk(@(w)quadgk(@(z)qfunc((a./w.^2)+(b./z.^2)).*(w.^2+z.^2-(4*r^2)<=0).*(w.^2+z.^2-2.*w.*z.*cos(theta1-theta2)>=0).*w.*z.*(1/16*pi^2*r^4), r, 2*r), 0, r), 0,2*pi), 0, 2*pi);
And I am getting the following error.
"Error using + Matrix dimensions must agree."
I feel there is dimension mismatch when evaluating over different variables. Could someone let me know how to evaluate this quadruple integral?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!