Error "Integrand output size does not match the input size." in implementing double integration. Kindly guide me in eliminating the error.
조회 수: 1 (최근 30일)
이전 댓글 표시
CODE:
a=0.15
d=sqrt(a.^2+a.^2)
M=@(a1,a2)(((((-(sqrt(a1.^2+a2.^2+d)).*a1)-((sqrt(a1.^2+a2.^2+d)).*a2)-(a1.^2)-(a2.^2)).*((sqrt(a1.^2+a2.^2+d))-a1).*((sqrt(a1.^2+a2.^2+d))-a2))+((-(sqrt(a1.^2+a2.^2+d)).*a1+(sqrt(a1.^2+a2.^2+d)).*a2+a1.^2+a2.^2).*((sqrt(a1.^2+a2.^2+d))+a1).*((sqrt(a1.^2+a2.^2+d))-a2))+(((sqrt(a1.^2+a2.^2+d)).*a1+(sqrt(a1.^2+a2.^2+d)).*a2-a1.^2-a2.^2).*((sqrt(a1.^2+a2.^2+d))+a1).*((sqrt(a1.^2+a2.^2+d))+a2))+(((sqrt(a1.^2+a2.^2+d)).*a1-(sqrt(a1.^2+a2.^2+d)).*a2+a1.^2+a2.^2).*((sqrt(a1.^2+a2.^2+d))-a1).*((sqrt(a1.^2+a2.^2+d))+a2)))/((sqrt(a1.^2+a2.^2+d)).*((sqrt(a1.^2+a2.^2+d))+a1).*((sqrt(a1.^2+a2.^2+d))+a2).*((sqrt(a1.^2+a2.^2+d))-a1).*((sqrt(a1.^2+a2.^2+d))-a2)));
Mpq= integral2(M,-0.15,0.15,-0.15,0.15)
ERROR:
Error using integral2Calc>integral2t/tensor (line 241)
Integrand output size does not match the input size.
Error in integral2Calc>integral2t (line 55)
[Qsub,esub] = tensor(thetaL,thetaR,phiB,phiT);
Error in integral2Calc (line 9)
[q,errbnd] = integral2t(fun,xmin,xmax,ymin,ymax,optionstruct);
Error in integral2 (line 106)
Q = integral2Calc(fun,xmin,xmax,yminfun,ymaxfun,opstruct);
Error in Mtest3 (line 13)
Mpq= integral2(M,-0.15,0.15,-0.15,0.15)
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!