Quad2d error: Improper index matrix reference.

1 view (last 30 days)
Hello ,
I am trying to run a 2d integration but i keep getting the following error message:
Improper index matrix reference.
Error in @(phi,z)((M.*my0)/(2.*pi)).*((Z(k)-z).^2*((Z(k)-z).^2+R(k).^2-a.*R(k).*cos(phis-phi))-(((Z(k)-z).^2+R(k).^2).^(1/2)).*((a.^2+(Z(k)-z).^2+R(k).^2-2.*a.*R(k).*cos(phis-phi)).^(1/2)))./(((a.^2+(Z(k)-z).^2+R(k).^2-2.*a.*R(k).cos(phis-phi)).^(1/2)).*(2.*(Z(k)-z).^2+R(k).^2-R(k).^2.*cos(2.*(phis-phi))))
Error in integral2Calc>integral2t/tensor (line 229) Z = FUN(X,Y); NFE = NFE + 1;
Thank you for your help

Answers (0)

Categories

Find more on Curve Fitting Toolbox in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!