CODE:
x=0y=0u0=4*pi*(10^-7);f=5*10^6;w=2*pi*f;u=4*pi*(10^-7);U=2;a=0.5N=5for d=0.1:0.1:1 s=0.001 N=5 wd=0.011 r0=0.0001608e=7*(8.854*10^-12) %dry sand check again
sig=0.11 %variable so check again
alpha=3.9*10^-3 %temp coeff
T=26 %soil temp
T0=33 %room temp
dout=2*a d1=sqrt(2)*a aw=wd./2 din=dout-(2*N*wd)-(2*(N-2)*s) davg=(dout-din)./(dout+din) ltc=4.*N.*(dout-(N-1).*(wd+s)) %ORIGINAL CORRECT
Aw=pi.*(aw.^2)R=(r0.*ltc.*(1+alpha.*(T-T0)))./Awtheta=90 J=2.*sin(theta).*sin(theta)+cos(theta).*cos(theta) sd=(w.*(sqrt((u.*e./2).*(sqrt(1+(sig./(w.*e))^2)-1))))^(-1) G=exp(-d./sd) Mt1=0 Bz=@(ai) (((u)/(2*pi*sqrt(((r0+ai)^2)+(d^2))))*((ellipticK(pi/2))+(((-r0^2-d^2+ai^2)/((r0-ai)^2+d^2))*ellipticE(pi/2))))M=zeros(1,N*N)for i=1:1:N ai=a-2*(N-1)*wd-2*(N-1)*s:2*(wd+s):a-2*(N-N)*wd-2*(N-N)*sfor j=1:1:N aj=a-2*(N-1)*wd-2*(N-1)*s:2*(wd+s):a-2*(N-N)*wd-2*(N-N)*sM=integral2(Bz,0,ai,0,aj) endend Mt1=Mt1+MMtotal=Mtl*J*Gend end
ERROR:
Error using integral2 (line 76)
XMAX must be a floating point scalar.
Error in FPSCCLM2 (line 93)
M=integral2(Bz,0,ai,0,aj)
Best Answer