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!