diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /42 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '42')
74 files changed, 904 insertions, 0 deletions
diff --git a/42/CH1/EX1.1/sadiku_1_1.sce b/42/CH1/EX1.1/sadiku_1_1.sce new file mode 100755 index 000000000..d53165a9a --- /dev/null +++ b/42/CH1/EX1.1/sadiku_1_1.sce @@ -0,0 +1,13 @@ +clear;
+clc;
+format('v',6)
+A=[10,-4,6];
+B=[2,1,0];
+disp(A(1,2),'Component of A along ay : ')
+P=3*A-B;
+disp((P(1,1)^2+P(1,2)^2+P(1,3)^2)^0.5,'magnitude is :')
+C=A+2*B;
+det_C=(C(1,1)^2+C(1,2)^2+C(1,3)^2)^0.5;
+format('v',7)
+ac=C/det_C;
+disp(ac,'Unit Vector along C is :')
\ No newline at end of file diff --git a/42/CH1/EX1.2/sadiku_1_2.sce b/42/CH1/EX1.2/sadiku_1_2.sce new file mode 100755 index 000000000..1a76ecaf0 --- /dev/null +++ b/42/CH1/EX1.2/sadiku_1_2.sce @@ -0,0 +1,14 @@ +clear;
+clc;
+format('v',6);
+P=[0,2,4];
+Q=[-3,1,5];
+origin=[0,0,0];
+rp=P-origin;
+disp(rp,'Position Vector of P is :')
+rpq=Q-P;
+disp(rpq,'Position Vector from P to Q is :')
+det_rpq=(rpq(1,1)^2+rpq(1,2)^2+rpq(1,3)^2)^0.5;
+disp(det_rpq,'distance between P and Q is :')
+A=10*rpq/det_rpq;
+disp([A;-A],'Vectors parallel to PQ with magnitude of 10 :')
\ No newline at end of file diff --git a/42/CH1/EX1.3/sadiku_1_3.sce b/42/CH1/EX1.3/sadiku_1_3.sce new file mode 100755 index 000000000..7c24e6765 --- /dev/null +++ b/42/CH1/EX1.3/sadiku_1_3.sce @@ -0,0 +1,9 @@ +format ('v',6);
+vb= [10*cos(%pi/4), -10*sin(%pi/4)]
+vm= [-2*cos(%pi/4), -2*sin(%pi/4)]
+vmg= vb+vm;
+disp (vmg, 'Velocity of man with respect to ground:')
+mod_vmg=(vmg(1,1)^2+vmg(1,2)^2)^.5;
+dir= atand(vmg(1,2)/vmg(1,1))
+disp( mod_vmg,'Absolute velocity of man is:' )
+disp (dir,'Angle with east in radian:')
\ No newline at end of file diff --git a/42/CH1/EX1.4/sadiku_1_4.sce b/42/CH1/EX1.4/sadiku_1_4.sce new file mode 100755 index 000000000..9b005ac42 --- /dev/null +++ b/42/CH1/EX1.4/sadiku_1_4.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+A=[3,4,1];
+B=[0,2,-5];
+det_A=(A(1,1)^2+A(1,2)^2+A(1,3)^2)^0.5;
+det_B=(B(1,1)^2+B(1,2)^2+B(1,3)^2)^0.5;
+theta=acosd((sum(A.*B))/(det_A*det_B));
+disp(theta,'Angle between A and B is :')
\ No newline at end of file diff --git a/42/CH1/EX1.5/sadiku_1_5.sce b/42/CH1/EX1.5/sadiku_1_5.sce new file mode 100755 index 000000000..9e4a71d0f --- /dev/null +++ b/42/CH1/EX1.5/sadiku_1_5.sce @@ -0,0 +1,39 @@ +clear;
+clc;
+format('v',7);
+P=[2,0,-1];
+Q=[2,-1,2];
+R=[2,-3,1];
+S=P+Q;
+T=P-Q;
+U1=S(1,2)*T(1,3)-S(1,3)*T(1,2);
+U2=S(1,3)*T(1,1)-S(1,1)*T(1,3);
+U3=S(1,1)*T(1,2)-S(1,2)*T(1,1);
+U=[U1 U2 U3];
+disp(U,'(P+Q)*(P-Q)=')
+V1=R(1,2)*P(1,3)-R(1,3)*P(1,2);
+V2=R(1,3)*P(1,1)-R(1,1)*P(1,3);
+V3=R(1,1)*P(1,2)-R(1,2)*P(1,1);
+V=[V1 V2 V3];
+X=(Q(1,1)*V(1,1)+Q(1,2)*V(1,2)+Q(1,3)*V(1,3));
+disp(X,'Q.R*P')
+W1=Q(1,2)*R(1,3)-Q(1,3)*R(1,2);
+W2=Q(1,3)*R(1,1)-Q(1,1)*R(1,3);
+W3=Q(1,1)*R(1,2)-Q(1,2)*R(1,1);
+W=[W1 W2 W3];
+Y=(W(1,1)*P(1,1)+W(1,2)*P(1,2)+W(1,3)*P(1,3));
+disp(Y,'P.Q*R')
+det_W=(W(1,1)^2+W(1,2)^2+W(1,3)^2)^.5;
+det_Q=(Q(1,1)^2+Q(1,2)^2+Q(1,3)^2)^.5;
+det_R=(R(1,1)^2+R(1,2)^2+R(1,3)^2)^.5
+sineoftheta=(det_W/(det_Q*det_R));
+disp(sineoftheta,'sin of theta=')
+Z1=P(1,2)*W(1,3)-P(1,3)*W(1,2);
+Z2=P(1,3)*W(1,1)-P(1,1)*W(1,3);
+Z3=P(1,1)*W(1,2)-P(1,2)*W(1,1);
+Z=[Z1 Z2 Z3];
+disp(Z,'P* Q*R=')
+disp(W/det_W,'Unit Vector Perpendicular to Q & R')
+q=Q/det_Q;
+C=(P(1,1)*q(1,1)+P(1,2)*q(1,2)+P(1,3)*q(1,3));
+disp(C*q,'Component of P along Q');
diff --git a/42/CH1/EX1.7/sadiku_1_7.sce b/42/CH1/EX1.7/sadiku_1_7.sce new file mode 100755 index 000000000..2da9cf668 --- /dev/null +++ b/42/CH1/EX1.7/sadiku_1_7.sce @@ -0,0 +1,25 @@ +clear;
+clc;
+format('v',6);
+P1=[5 2 -4];
+P2=[1 1 2];
+P3=[-3 0 8];
+P4=[3 -1 0]
+R1=P1-P2;
+R2=P1-P3;
+R3=P2-P3;
+R4=P1-P4;
+U1=R1(1,2)*R2(1,3)-R1(1,3)*R2(1,2);
+U2=R1(1,3)*R2(1,1)-R1(1,1)*R2(1,3);
+U3=R1(1,1)*R2(1,2)-R1(1,2)*R2(1,1);
+U=[U1 U2 U3];
+disp(U)
+disp('Since U is Zero so P1,P2,P3 are in straight line')
+det_R1=(R1(1,1)^2+R1(1,2)^2+R1(1,3)^2)^.5;
+V1=R4(1,2)*R1(1,3)-R4(1,3)*R1(1,2);
+V2=R4(1,3)*R1(1,1)-R4(1,1)*R1(1,3);
+V3=R4(1,1)*R1(1,2)-R4(1,2)*R1(1,1);
+V=[V1 V2 V3];
+det_V=(V(1,1)^2+V(1,2)^2+V(1,3)^2)^.5;
+det_R1=(R1(1,1)^2+R1(1,2)^2+R1(1,3)^2)^.5;
+disp((det_V/det_R1),'Shortest Distance')
\ No newline at end of file diff --git a/42/CH10/EX10.1/sadiku_10_1.sce b/42/CH10/EX10.1/sadiku_10_1.sce new file mode 100755 index 000000000..9d22d6b91 --- /dev/null +++ b/42/CH10/EX10.1/sadiku_10_1.sce @@ -0,0 +1,22 @@ +clear;
+clc;
+format('v',6);
+disp('Direction of wave propagation is -ax');
+w=10^8,c=3*10^8;
+B=w/c;
+disp(B,'Value of beta=');
+T=2*%pi/w;
+disp(T/2*10^9,'Time taken to travel half of wave length in nS= ');
+t=0
+x=-2*%pi:%pi/16:2*%pi;
+Ey=50*cos(10^8 *t +B*x);
+subplot(2,2,1)
+plot(x,Ey);
+t=T/4;
+Ey=50*cos(10^8 *t +B*x);
+subplot(2,2,2)
+plot(x,Ey);
+t=T/2;
+Ey=50*cos(10^8 *t +B*x);
+subplot(2,2,3)
+plot(x,Ey);
\ No newline at end of file diff --git a/42/CH10/EX10.10/sadiku_10_10.sce b/42/CH10/EX10.10/sadiku_10_10.sce new file mode 100755 index 000000000..0951436be --- /dev/null +++ b/42/CH10/EX10.10/sadiku_10_10.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+kx=0,ky=.866,kz=.5,Eo=10^-9 /(36*%pi),Uo=4*%pi*10^-7;
+k=sqrt(kx*kx+ky*ky+kz*kz);
+w=k/(sqrt(Uo*Eo));
+disp(w*10^-6,'w im Mrad/sec');
+l=2*%pi/k;
+disp(l,'lamda = ')
diff --git a/42/CH10/EX10.2/sadiku_10_2.sce b/42/CH10/EX10.2/sadiku_10_2.sce new file mode 100755 index 000000000..fe47ad353 --- /dev/null +++ b/42/CH10/EX10.2/sadiku_10_2.sce @@ -0,0 +1,9 @@ +clear;
+clc;
+Ho=10,n=200*%e^(%i*%pi/6),P=atan(3^.5),b=.5,e=10^-9 /(36*%pi);
+Eo=n*Ho;
+disp('a=w*sqrt(u*e/2*(1+(c/(w*e)^2)^.5)-1)');
+disp('b=w*sqrt(u*e/2*(1+(c/(w*e)^2)^.5)+1)');
+a=b*((sqrt(((1+(tan(P))^2)^.5)-1))/(sqrt(((1+(tan(P))^2)^.5)+1)));
+disp(a,'Value of alpha=');
+disp(1/a,'Skin depth = ')
\ No newline at end of file diff --git a/42/CH10/EX10.3/sadiku_10_3.sce b/42/CH10/EX10.3/sadiku_10_3.sce new file mode 100755 index 000000000..3e063eb1b --- /dev/null +++ b/42/CH10/EX10.3/sadiku_10_3.sce @@ -0,0 +1,7 @@ +clear;
+clc;
+B=1,n=60*%pi,Ur=1,Eo=10^-9 /(36*%pi),Uo=4*%pi*10^-7;
+Er=Uo*Ur/(n^2 *Eo);
+disp(Er,'Er =');
+w=B/sqrt(Eo*Er*Uo*Ur);
+disp(w*10^-6, 'w in Mrad/sec');
\ No newline at end of file diff --git a/42/CH10/EX10.4/sadiku_10_4.sce b/42/CH10/EX10.4/sadiku_10_4.sce new file mode 100755 index 000000000..d1844c6df --- /dev/null +++ b/42/CH10/EX10.4/sadiku_10_4.sce @@ -0,0 +1,5 @@ +clear;
+clc;
+c=3,w=10^8,Ur=20,Eo=10^-9 /(36*%pi),Er=1,Uo=4*%pi*10^-7;
+a=sqrt(Uo*Ur*w*c/2);
+disp(a,'alpha = beta =');//as c/w*E>>1
diff --git a/42/CH10/EX10.6/sadiku_10_6.sce b/42/CH10/EX10.6/sadiku_10_6.sce new file mode 100755 index 000000000..e7fc6ab92 --- /dev/null +++ b/42/CH10/EX10.6/sadiku_10_6.sce @@ -0,0 +1,7 @@ +clear;
+clc;
+a=2*10^-3,b=6*10^-3,t=10^-3,l=2,c=5.8*10^7;
+Ri=l/(c*%pi*a*a);
+Ro=l/(c*%pi*((b+t)^2-b^2));
+Rdc=Ro+Ri;
+disp(Rdc*10^3,'Resistance in mOhm');
\ No newline at end of file diff --git a/42/CH10/EX10.7/sadiku_10_7.sce b/42/CH10/EX10.7/sadiku_10_7.sce new file mode 100755 index 000000000..1bcfe4b6f --- /dev/null +++ b/42/CH10/EX10.7/sadiku_10_7.sce @@ -0,0 +1,7 @@ +clear;
+clc;
+a=0,b=.8,Eo=10^-9 /(36*%pi),Uo=4*%pi*10^-7,Ur=1,w=2*%pi*10^7;
+Er=b^2/(Uo*Eo*w*w);
+disp(Er);
+n=sqrt(Uo/(Eo*Er));
+disp(n);
\ No newline at end of file diff --git a/42/CH11/EX11.1/sadiku_11_1.sce b/42/CH11/EX11.1/sadiku_11_1.sce new file mode 100755 index 000000000..e33e58c03 --- /dev/null +++ b/42/CH11/EX11.1/sadiku_11_1.sce @@ -0,0 +1,9 @@ +clear;
+clc;
+format('v',6);
+R=0,G=0,a=0,Ro=70,B=3,f=100*10^6;
+w=2*%pi*f;
+C=B/(w*Ro);
+disp(C*10^12,'Capacitance per meter of line in pF')
+L=Ro*Ro*C;
+disp(L*10^9,'Inductance per meter in nHz')
\ No newline at end of file diff --git a/42/CH11/EX11.10/sadiku_11_10.sce b/42/CH11/EX11.10/sadiku_11_10.sce new file mode 100755 index 000000000..379ba54b4 --- /dev/null +++ b/42/CH11/EX11.10/sadiku_11_10.sce @@ -0,0 +1,12 @@ +clear;
+clc;
+format('v',6);
+Er=3.8, c=3*10^8;
+r=4.5;//ratio w/h
+Eeff= ((Er+1)/2)+ ((Er-1)/(2*(1+12/r)^.5));
+disp(Eeff, 'The effective relative permittivity = ');
+Zo=(120*%pi)/((r+1.393+ (.667*log(r+1.444)))*((Eeff)^.5));
+disp(Zo, 'Character impedence of line');
+f=10^10;
+l=c/(f*sqrt(Eeff));
+disp(l*1000, 'The wavelength of line at 10 GHz');
diff --git a/42/CH11/EX11.11/sadiku_11_11.sce b/42/CH11/EX11.11/sadiku_11_11.sce new file mode 100755 index 000000000..325e163c3 --- /dev/null +++ b/42/CH11/EX11.11/sadiku_11_11.sce @@ -0,0 +1,13 @@ +clear;
+clc;
+h=1, w=.8, Er=6.6, P= atan(.0001), c= 5.8*10^7,f=10^10,mu=4*%pi*10^(-7),C=3*10^8;
+r=w/h;
+Ee=((Er+1)/2)+ ((Er-1)/(2*(1+12/r)^.5));
+Zo=(120*%pi)/((r+1.393+ (.667*log(r+1.444)))*((Ee)^.5));
+Rs=((%pi*f*mu)/c)^.5;
+ac=8.686*Rs/(w*10^-3*Zo);
+disp(ac,'Conduction Attenuation Constant = ');
+l=C/(f*(Ee)^.5);
+disp(l);
+ad=27.3*(Ee-1)*Er*tan(P)/((Er-1)*Ee*l);
+disp(ad,'Dielectric Attenuation Constant =');
\ No newline at end of file diff --git a/42/CH11/EX11.2/sadiku_11_2.sce b/42/CH11/EX11.2/sadiku_11_2.sce new file mode 100755 index 000000000..c4c50b012 --- /dev/null +++ b/42/CH11/EX11.2/sadiku_11_2.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+Zo=60,a=20*10^-3,u=.6*3*10^8, f=100*10^6;
+R=a*Zo,disp(R,'R=');
+L=Zo/u,disp(L*10^9,'L in nH=');
+G=a*a/R,disp(G*10^6,'G in micro S per meter =');
+C=1/(u*Zo),disp(C*10^12,'C in pF =');
+l=u/f;disp(l,'l=');
diff --git a/42/CH11/EX11.3/sadiku_11_3.sce b/42/CH11/EX11.3/sadiku_11_3.sce new file mode 100755 index 000000000..9046fa37a --- /dev/null +++ b/42/CH11/EX11.3/sadiku_11_3.sce @@ -0,0 +1,18 @@ +clear;
+clc;
+format('v',6);
+w=10^6,B=1,a=8,Vg=10;
+Zo=60+40*%i,Zg=40,Zl=20+50*%i;
+a=(a/8.686);;//Since 1Np=8.686 dB
+Y=a+B*%i;
+Yl=2*Y;
+h=tanh(Yl);
+Zin=Zo*(Zl+Zo*tanh(Yl))/(Zo+Zl*tanh(Yl));
+disp(Zin,'The input impdence =');
+Io=Vg/(Zin+Zg);//at z=0
+disp(Io*1000,'Sending end current in mA =');
+Vo=Zin*Io;
+Vop =(Vo+Zo*Io)/2;
+Vom =(Vo-Zo*Io)/2;
+Im= ((Vop * %e^-Y)/Zo)- ((Vom * %e^Y)/Zo);
+disp(Im*1000, 'Current at middle line in mA= ');
diff --git a/42/CH11/EX11.4/sadiku_11_4.sce b/42/CH11/EX11.4/sadiku_11_4.sce new file mode 100755 index 000000000..bf1c4c41b --- /dev/null +++ b/42/CH11/EX11.4/sadiku_11_4.sce @@ -0,0 +1,12 @@ +clear;
+clc;
+format('v',6);
+l=30,Zo=50,f=2*10^6,Zl=60+40*%i,u=.6*3*10^8;
+w=2*%pi*f;
+T=(Zl-Zo)/(Zl+Zo);
+disp(T,'Reflection coefficient =');
+s=(1+abs(T))/(1-abs(T));
+disp(s,'Standing wave ratio =');
+B=w/u;disp(B*l);
+Zin=Zo*(Zl+Zo*tan(B*l)*%i)/(Zo+Zl*tan(B*l)*%i);
+disp(Zin);
\ No newline at end of file diff --git a/42/CH11/EX11.5/sadiku_11_5.sce b/42/CH11/EX11.5/sadiku_11_5.sce new file mode 100755 index 000000000..0d3ddb6a8 --- /dev/null +++ b/42/CH11/EX11.5/sadiku_11_5.sce @@ -0,0 +1,23 @@ +clear;
+clc;
+format('v',6);
+Zl=100+150*%i;
+Zo=75;
+zl=Zl/Zo;
+T=(Zl-Zo)/(Zl+Zo);
+disp(T,'T =');
+s=(1+abs(T))/(1-abs(T));
+disp(s,'s =')
+format('v',5);
+Yl=1/Zl;
+disp(Yl*1000,'Load admittance in mS');
+B=2*%pi,l=.4;
+Zin=Zo*(Zl+Zo*tan(B*l)*%i)/(Zo+Zl*tan(B*l)*%i);
+format('v',6);
+disp(Zin,'Zin at .4 l from load')//for .4l
+B=2*%pi,l=.6;
+Zin=Zo*(Zl+Zo*tan(B*l)*%i)/(Zo+Zl*tan(B*l)*%i);
+format('v',6);
+disp(Zin,'Zin at .6 l from load')//for .6l
+
+
diff --git a/42/CH11/EX11.6/sadiku_11_6.sce b/42/CH11/EX11.6/sadiku_11_6.sce new file mode 100755 index 000000000..e1fb6d8c9 --- /dev/null +++ b/42/CH11/EX11.6/sadiku_11_6.sce @@ -0,0 +1,11 @@ +clear;
+clc;
+s=2, l1=11,l2=19,ma=24,mi=16,u=3*10^8,Zo=50;
+l=(l2-l1)*2;
+disp(l,'Lamda =');
+f=u/l;
+disp(f*10^-6,'Frequency im MHz =');
+L=(24-19)/l;//Let us assume load is at 24cm
+zl=1.4+.75*%i; //by smith chart
+Zl=Zo*zl;
+disp(Zl,'Zl =')
\ No newline at end of file diff --git a/42/CH11/EX11.7/sadiku_11_7.sce b/42/CH11/EX11.7/sadiku_11_7.sce new file mode 100755 index 000000000..f5be14ec6 --- /dev/null +++ b/42/CH11/EX11.7/sadiku_11_7.sce @@ -0,0 +1,14 @@ +clear;
+clc;
+format('v',6);
+Zo=100, Zl=40+30*%i;
+Yo=1/Zo;
+yl=Zo/Zl;
+ys1=1.04*%i, ys2=-1.04*%i; //By smith chart
+Ys1=Yo*ys1, Ys2=Yo*ys2;
+disp([Ys1*1000 Ys2*1000],'Possible values of sub admittance in mS =');
+la=.5 - (62-(-39))/720 ;disp(la, 'distance between load and antenna at A devided by Lamda');
+lb= (62-39)/720;disp(lb, 'distance between load and antenna at B devided by Lamda');//With the help of figure
+da=88/720, db= 272/720;
+format('v',7);
+disp(da,db,'Sub length devided by Lamda');
\ No newline at end of file diff --git a/42/CH11/EX11.8/sadiku_11_8.sce b/42/CH11/EX11.8/sadiku_11_8.sce new file mode 100755 index 000000000..9ad5bb7f7 --- /dev/null +++ b/42/CH11/EX11.8/sadiku_11_8.sce @@ -0,0 +1,6 @@ +clear;
+clc;
+Zg=100,Zo=50,Zl=200,u=3*10^8,l=100,Vg=12;
+Tg=(Zg-Zo)/(Zg+Zo);
+Tl=(Zl-Zo)/(Zl+Zo);
+t1=l/u;
diff --git a/42/CH12/EX12.1/sadiku_12_1.sce b/42/CH12/EX12.1/sadiku_12_1.sce new file mode 100755 index 000000000..d6a6943b1 --- /dev/null +++ b/42/CH12/EX12.1/sadiku_12_1.sce @@ -0,0 +1,30 @@ +clear;
+clc;
+a=2.5*10^-2, b=1*10^-2,c=0, Ur=1,Er=4,C=3*10^8;
+fc=0,m=0,n=0;
+while(fc*10^-9<15.1)
+fc=(C/(4*a))*sqrt(m^2 + (a*n/b)^2);
+if ((fc*10^-9) < 15.1) then
+n=n+1;
+else disp(n-1,'Max value of n is ='); end
+end
+fc=0,m=0,n=0;
+while(fc*10^-9<15.1)
+fc=(C/(4*a))*sqrt(m^2 + (a*n/b)^2);
+if ((fc*10^-9) < 15.1) then
+m=m+1;
+else disp(m-1,'Max value of m is ='); end
+end
+function[p]= modes(m,n);
+p=(C/(4*a))*sqrt(m^2 + (a*n/b)^2);
+if ((p*10^-9) < 15.1) then
+disp([m n],'Transmission mode is possible'); else p=0;end
+endfunction
+for i=1:1:5, for j=1:1:2,modes(i,j);end;
+end
+
+
+
+
+
+
diff --git a/42/CH12/EX12.3/sadiku_12_3.sce b/42/CH12/EX12.3/sadiku_12_3.sce new file mode 100755 index 000000000..1f8146b2e --- /dev/null +++ b/42/CH12/EX12.3/sadiku_12_3.sce @@ -0,0 +1,13 @@ +clear;
+clc;
+format('v',7);
+a=1.5*10^-2,b=.8*10^-2,c=0,Uo=4*%pi*10^-7,Ur=1,Eo=10^-9/(36*%pi),Er=4,C=3*10^8,w=%pi*10^11,m=1,n=3;
+u=C/2;
+f=w/(2*%pi);
+fc=u*((m*m)/(a*a) + (n*n)/(b*b) )^.5/2;
+disp(fc*10^-9,'Cutoff frequency = ');
+B=w*sqrt(Uo*Ur*Eo*Er)*sqrt(1-(fc/f)^2);
+disp(B,'Phase constant = ');
+disp(%i*B,'Propagation constant = ');
+n=377/sqrt(Er)*sqrt(1-(fc/f)^2);
+disp(n,'Intrinsic wave impedence = ');
\ No newline at end of file diff --git a/42/CH12/EX12.4/sadiku_12_4.sce b/42/CH12/EX12.4/sadiku_12_4.sce new file mode 100755 index 000000000..8640072c1 --- /dev/null +++ b/42/CH12/EX12.4/sadiku_12_4.sce @@ -0,0 +1,13 @@ +clear;
+clc;
+a=8.636*10^-2,b=4.318*10^-2,f=4*10^9;
+u=3*10^8;
+fc=u/(2*a);
+disp(fc*10^-9,'Cut off frquency = ');
+if(f>fc) then disp('As f>fc so TE10 mode will propagate')
+else disp('It will not propagate')
+end
+Up=u/sqrt(1-(fc/f)^2);
+disp(Up*10^-6,'Phase velocity in Mm/sec = ');
+Ug=u*u/Up;
+disp(Ug*10^-6,'Group velocity in Mm/sec = ');
\ No newline at end of file diff --git a/42/CH12/EX12.5/sadiku_12_5.sce b/42/CH12/EX12.5/sadiku_12_5.sce new file mode 100755 index 000000000..9d487e2a1 --- /dev/null +++ b/42/CH12/EX12.5/sadiku_12_5.sce @@ -0,0 +1,7 @@ +clear;
+clc;
+f=10*10^9,a=4*10^-2,b=2*10^-2,u=3*10^8,Pavg=2*10^-3;
+fc=u/(2*a);
+n=377/sqrt(1-(fc/f)^2);
+E=sqrt(4*n*Pavg/(a*b));
+disp(E,'Peak value of Electric field = ');
\ No newline at end of file diff --git a/42/CH12/EX12.6/sadiku_12_6.sce b/42/CH12/EX12.6/sadiku_12_6.sce new file mode 100755 index 000000000..ff01358cf --- /dev/null +++ b/42/CH12/EX12.6/sadiku_12_6.sce @@ -0,0 +1,12 @@ +clear;
+clc;
+cc=5.8*10^7, f=4.8*10^9,c=10^-17,Uo=4*%pi*10^-7,Eo=10^-9/(36*%pi),Er=2.55,z=60*10^-2,l=4.2*10^-2,b=2.6*10^-2,P=1.2*10^3;
+n=377/sqrt(Er);
+u=3*10^8 /sqrt(Er);
+fc=u/(2*l);
+ad=c*n/(2*sqrt(1-(fc/f^2)));
+Rs=sqrt(%pi*f*Uo/cc);
+ac=2*Rs*(.5+(b/l)*(fc/f)^2)/(b*n*sqrt(1-(fc/f)^2));
+a=ac;
+Pd=P*(%e^(2*a*z) -1);
+disp(Pd,'Power dissipiated = ');
\ No newline at end of file diff --git a/42/CH12/EX12.8/sadiku_12_8.sce b/42/CH12/EX12.8/sadiku_12_8.sce new file mode 100755 index 000000000..462d63fda --- /dev/null +++ b/42/CH12/EX12.8/sadiku_12_8.sce @@ -0,0 +1,7 @@ +clear;
+clc;
+a=5*10^-2,b=4*10^-2,c=10*10^-2,C=5.8*10^7,Uo=4*%pi*10^-7;
+f101=3.335*10^9;
+d=sqrt(1/(%pi*f101*Uo*C));
+Q=(a*a+c*c)*a*b*c/(d*(2*b*(a^3 + c^3)+a*c*(a*a+c*c)));
+disp(Q,'Quality factor of TE101 = ');
\ No newline at end of file diff --git a/42/CH13/EX13.1/sadiku_13_1.sce b/42/CH13/EX13.1/sadiku_13_1.sce new file mode 100755 index 000000000..81d97868d --- /dev/null +++ b/42/CH13/EX13.1/sadiku_13_1.sce @@ -0,0 +1,31 @@ +clear;
+clc;
+format('v',5);
+function[P,I]=powerhert(H,P,r,B,dl)
+I=H*4*r*%pi/((B*(dl))*sin(P));
+P=40*%pi*%pi*I*I*dl*dl;
+disp(P*1000,'Power transmit by Hertizian dipole in mWatt');
+endfunction
+powerhert((5*(10)^-6),%pi/2,2000,(2*%pi),1/25);
+function[P,I]=powerhw(H,P,r)
+I=H*2*r*%pi*sin(P)/(cos((%pi/2)*cos(P)));R=73;
+P=(I*I*R)/2;
+disp(P*1000,'Power transmit by Half wave dipole in mWatt');
+endfunction
+powerhw((5*(10)^-6),%pi/2,2000);
+function[P,I]=powerqw(H,P,r)
+I=H*2*r*%pi*sin(P)/(cos((%pi/2)*cos(P)));R=36.56;
+P=(I*I*R)/2;format('v',4);
+disp(P*1000,'Power transmit by Quarterwave monopole in mWatt');
+endfunction
+powerqw((5*(10)^-6),%pi/2,2000);
+function[P,I]=powersingloop(H,r,k);R=192.3;
+I=H*r/(%pi*%pi*10*k*k);
+P=(I*I*R)/2;
+disp(P*1000,'Power transmit by 10 turn loop antena in mWatt');
+endfunction
+powersingloop((5*(10)^-6),2000,1/20);
+
+
+
+
diff --git a/42/CH13/EX13.10/sadiku_13_10.sce b/42/CH13/EX13.10/sadiku_13_10.sce new file mode 100755 index 000000000..6ab8bf7a9 --- /dev/null +++ b/42/CH13/EX13.10/sadiku_13_10.sce @@ -0,0 +1,12 @@ +clear;
+clc;
+c=3*(10)^8, f=3*(10)^9,Aet=9,r1=1.852*(10)^5,r2=4*r1,r3=5.556*10^5,Pr=200*(10)^3,a=20;
+l=c/f;
+Gdt=4*%pi*Aet/(l*l);
+P1=Gdt*Pr/(4*%pi*r1*r1);
+P2=Gdt*Pr/(4*%pi*r2*r2);
+disp(P1*1000,'Signal power density at 100nmile in mWatt');
+disp(P2*1000,'Signal power density at 400nmile in mWatt');
+Pr=Aet*a*Gdt*Pr/(4*%pi*r3*r3)^2;
+disp(Pr*10^12,'Power of reflected signal in picoWatt');
+
diff --git a/42/CH13/EX13.2/sadiku_13_2.sce b/42/CH13/EX13.2/sadiku_13_2.sce new file mode 100755 index 000000000..b4c6cb804 --- /dev/null +++ b/42/CH13/EX13.2/sadiku_13_2.sce @@ -0,0 +1,18 @@ +clear;
+clc;
+format('v',6);
+c=3*10^8;
+f=50*10^6;
+disp(c/(2*f),'Length of halfdipole in meter');
+function[P,I]=curpow(E,P,r)
+n=120*%pi; R=73;
+I=E*2*r*%pi*sin(P)/(n*(cos((%pi/2)*cos(P))));
+P=(I*I*R)/2;
+disp(I*1000,'Current fed to antenna in mA');
+disp(P*1000,'Power radiated by Antenna in mWatt');
+endfunction
+curpow((10*(10)^-6),%pi/2,500*10^3);
+Zl=73+42.5*%i,Zo=75;
+T=(Zl-Zo)/(Zl+Zo);
+s=(1+abs(T))/(1-abs(T));
+disp(s,'Standing wave ratio');
\ No newline at end of file diff --git a/42/CH13/EX13.3/sadiku_13_3.sce b/42/CH13/EX13.3/sadiku_13_3.sce new file mode 100755 index 000000000..4a4275e74 --- /dev/null +++ b/42/CH13/EX13.3/sadiku_13_3.sce @@ -0,0 +1,5 @@ +clear;
+clc;
+G=(integrate('(sin(P))^3','P',0,%pi))*integrate('1','Q',0,2*%pi)
+Gd=4*%pi/G;
+disp(Gd)
diff --git a/42/CH13/EX13.4/sadiku_13_4.sce b/42/CH13/EX13.4/sadiku_13_4.sce new file mode 100755 index 000000000..c32f27ba0 --- /dev/null +++ b/42/CH13/EX13.4/sadiku_13_4.sce @@ -0,0 +1,10 @@ +clear;
+clc;
+format('v',7);
+G=5;
+r=10*10^3;
+P=20*10^3;
+n=120*%pi;
+Gd=10^(G/10);
+E=sqrt(n*Gd*P/(2*%pi*r*r));
+disp(E,'Electric field intensity at 10 km =');
\ No newline at end of file diff --git a/42/CH13/EX13.5/sadiku_13_5.sce b/42/CH13/EX13.5/sadiku_13_5.sce new file mode 100755 index 000000000..239b77680 --- /dev/null +++ b/42/CH13/EX13.5/sadiku_13_5.sce @@ -0,0 +1,6 @@ +clear;
+clc;
+Umax=2;
+Uavg=(1/(4*%pi))*2*integrate('(sin (P))^2','P',0,%pi)*integrate('(sin (Q))^3','Q',0,%pi);
+D=Umax/Uavg;
+disp(D,'Directivity of antenna');
\ No newline at end of file diff --git a/42/CH13/EX13.8/sadiku_13_8.sce b/42/CH13/EX13.8/sadiku_13_8.sce new file mode 100755 index 000000000..b2b16f08f --- /dev/null +++ b/42/CH13/EX13.8/sadiku_13_8.sce @@ -0,0 +1,12 @@ +clear;
+clc;
+c=3*10^8,f=30*10^6,E=2*10^-3;
+l=c/f;
+n=120*%pi,R=73;
+format('v',5);
+Gdmax=n/(%pi*R);
+format('v',6);
+Amax=(l^2 /(4*%pi))*Gdmax;
+disp(Amax,'Maximum effective area');
+Pr=(E*E*Amax)/(2*n);
+disp(Pr*(10^9),'Power rerceived in nWatt')
\ No newline at end of file diff --git a/42/CH13/EX13.9/sadiku_13_9.sce b/42/CH13/EX13.9/sadiku_13_9.sce new file mode 100755 index 000000000..19daa2929 --- /dev/null +++ b/42/CH13/EX13.9/sadiku_13_9.sce @@ -0,0 +1,6 @@ +clear;
+clc;
+Gt=25,Gr=18,r=200,Pr=5*10^-3 ;
+Gdt=10^(Gt/10),Gdr=10^(Gr/10);
+Pt=Pr*(4*%pi*r)^2 /(Gdr*Gdt);
+disp(Pt,'Minimum power received in Watt =');
\ No newline at end of file diff --git a/42/CH14/EX14.1/sadiku_14_1.sce b/42/CH14/EX14.1/sadiku_14_1.sce new file mode 100755 index 000000000..4b5cc8994 --- /dev/null +++ b/42/CH14/EX14.1/sadiku_14_1.sce @@ -0,0 +1,10 @@ +clear;
+clc;
+S11=.85*(cosd(-30)+%i*sind(-30));
+S12=.07*(cosd(56)+%i*sind(56));
+S21=1.68*(cosd(120)+%i*sind(120));
+S22=.85*(cosd(-40)+%i*sind(-40));
+Zl=75,Zo=75;
+Tl=(Zl-Zo)/(Zl+Zo);
+Ti=S11+ (S12*S21*Tl)/(1-S22*Tl);
+disp(Ti,'Input reflection coefficient=')
\ No newline at end of file diff --git a/42/CH14/EX14.2/sadiku_14_2.sce b/42/CH14/EX14.2/sadiku_14_2.sce new file mode 100755 index 000000000..d80bdc0fa --- /dev/null +++ b/42/CH14/EX14.2/sadiku_14_2.sce @@ -0,0 +1,11 @@ +clear;
+clc;
+format('v',6)
+d=80*(10)^-6;
+n1=1.62,NA=.21,L=8*(10)^-7 ;
+P=asind(NA);
+disp(P,'Acceptance angle');
+n2=sqrt(n1^2 - NA^2);
+disp(n2,'Refractive index');
+V=(%pi*d/L)*sqrt(n1^2 - n2^2);
+disp(V,'No of modes');
diff --git a/42/CH14/EX14.3/sadiku_14_3.sce b/42/CH14/EX14.3/sadiku_14_3.sce new file mode 100755 index 000000000..6b3a9caab --- /dev/null +++ b/42/CH14/EX14.3/sadiku_14_3.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+a=.25;
+P=1-.4;
+l=(10/a)*log10(1/P);
+disp(l,'Distance travelled in Km');
+
+
diff --git a/42/CH2/EX2.1/sadiku_2_1.sce b/42/CH2/EX2.1/sadiku_2_1.sce new file mode 100755 index 000000000..fa4b595b5 --- /dev/null +++ b/42/CH2/EX2.1/sadiku_2_1.sce @@ -0,0 +1,12 @@ +clear;
+clc;
+format('v',7);
+x=-2;y=6;z=3;
+r=(x^2+y^2)^.5;
+B=atand(y/x);
+R=sqrt(x^2+y^2+z^2);
+X=atand(r/z);
+disp([r B z ],'Cylindrical acordinate of P:');
+disp([R X B],'Spherical Cordinate of P:');
+A=[cosd(B) sind(B) 0;-sind(B) cosd(B) 0;0 0 1]*[y;x+z;0];
+disp (A,'A in cylindrical cordinates')
\ No newline at end of file diff --git a/42/CH2/EX2.2/sadiku_2_2.sce b/42/CH2/EX2.2/sadiku_2_2.sce new file mode 100755 index 000000000..570296bc9 --- /dev/null +++ b/42/CH2/EX2.2/sadiku_2_2.sce @@ -0,0 +1,22 @@ +clear;
+clc;
+format('v',6);
+function [X,Y,Z]=sptocart(x,y,z);
+R=sqrt(x^2+y^2+z^2);r=sqrt(x^2+y^2);
+P=asin(r/R);Q=acos(x/r);
+X=(10/R)*sin(P)*cos(Q)+R*(cos(P))^2 *cos(Q)-sin(Q);
+Y=(10/R)*sin(P)*sin(Q)+R*(cos(P))^2 *sin(Q)+cos(Q);
+Z=(10/R)*cos(P)-R*cos(P)*sin(P);
+disp([X Y Z],'B in cartesian cordinate')
+endfunction
+sptocart(-3,4,0);
+function [r,p,z]=sptocylin(r1,p1,z1);
+R=sqrt(r1^2+z1^2);
+P=acos(z1/R);
+r=(10/R)*sin(P)+R*(cos(P))^2 ;
+p=1;
+z=(10/R)*cos(P)-R*cos(P)*sin(P);
+disp([r p z],'B in cylindrical cordinates');
+endfunction
+sptocylin(5,%pi/2,-2);
+
diff --git a/42/CH2/EX2.3/sadiku_2_3.sce b/42/CH2/EX2.3/sadiku_2_3.sce new file mode 100755 index 000000000..34676fabb --- /dev/null +++ b/42/CH2/EX2.3/sadiku_2_3.sce @@ -0,0 +1,15 @@ +clear;
+clc;
+E=[-5 10 3];ModE=sqrt((-5)^2+10^2+3^2);
+F=[1 2 -6];
+P=[5,%pi/2,3];
+G1=E(1,2)*F(1,3)-E(1,3)*F(1,2);
+G2=E(1,3)*F(1,1)-E(1,1)*F(1,3);
+G3=E(1,1)*F(1,2)-E(1,2)*F(1,1);
+G=[G1 G2 G3];
+disp(sqrt(G1^2+G2^2+G3^2),'Mod of (E*F)');
+ay=[sin(%pi/2) cos(%pi/2) 0];
+Ey=(E(1,1)*ay(1,1)+E(1,2)*ay(1,2)+E(1,3)*ay(1,3));
+disp(Ey,'Component of E parallel to x=2 & z=3');
+P=acosd(3/ModE);
+disp(90-P,'Angle which make E wid Z=3');
\ No newline at end of file diff --git a/42/CH2/EX2.4/sadiku_2_4.sce b/42/CH2/EX2.4/sadiku_2_4.sce new file mode 100755 index 000000000..ff0403987 --- /dev/null +++ b/42/CH2/EX2.4/sadiku_2_4.sce @@ -0,0 +1,21 @@ +clear;
+clc;
+format('v',6)
+function [R,P,Q]=Posvec(r,p,q);
+R=r*sind(q);P=-sind(p)*cosd(q)/r;Q=r*r;
+D=[R P Q];
+disp(D,'D at P');
+Dn=[r*sind(q) 0 0];
+Dt=D-Dn;
+disp(Dt, 'Tangential component of D at P');
+endfunction
+Posvec(10,150,330);
+D=[-5 .043 100];
+a=[0 1 0];
+U1=D(1,2)*a(1,3)-D(1,3)*a(1,2);
+U2=D(1,3)*a(1,1)-D(1,1)*a(1,3);
+U3=D(1,1)*a(1,2)-D(1,2)*a(1,1);
+U=[U1 U2 U3];
+det_U=sqrt(U1^2+U2^2+U3^2);
+format('v',7);
+disp(U/det_U,'Unit vector P perpendicular to D');
diff --git a/42/CH3/EX3.1/sadiku_3_1.sce b/42/CH3/EX3.1/sadiku_3_1.sce new file mode 100755 index 000000000..741cb0b8c --- /dev/null +++ b/42/CH3/EX3.1/sadiku_3_1.sce @@ -0,0 +1,7 @@ +clear;
+clc;
+B1=[0,5,0],B2=[5,%pi/2,0],C1=[0 5 10],C2=[5 %pi/2 0],D1=[5 0 10],D2=[5,0,10],p=5;
+BC=integrate('1','Z',0,10);
+disp(BC); //as dl will be along dz
+CD=integrate('5','Q',0,%pi/2);
+disp(CD); //dl will be along d(phi)
\ No newline at end of file diff --git a/42/CH3/EX3.2/sadiku_3_2.sce b/42/CH3/EX3.2/sadiku_3_2.sce new file mode 100755 index 000000000..018d0aec3 --- /dev/null +++ b/42/CH3/EX3.2/sadiku_3_2.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+C1=integrate('x^2','x',1,0);//for y=0=z
+C2=0;// as (az.ay)=0
+C3=integrate('x^2 -1','x',0,1);
+C4=integrate('-y-y^2','y',1,0);
+C=C1+C2+C3+C4;
+disp(C);
\ No newline at end of file diff --git a/42/CH3/EX3.9/sadiku_3_9.sce b/42/CH3/EX3.9/sadiku_3_9.sce new file mode 100755 index 000000000..371f825f7 --- /dev/null +++ b/42/CH3/EX3.9/sadiku_3_9.sce @@ -0,0 +1,12 @@ +clear;
+clc;
+ab=integrate('2*sin(P)','P',%pi/3,%pi/6);
+bc=(3^.5 /2)*integrate('p','p',2,5);
+Cd=integrate('5*sin(P)','P',%pi/6,%pi/3);
+da=.5*integrate('p','p',5,2);
+C1=ab+bc+Cd+da;
+disp(C1, 'C1=');
+C2=integrate('sin(Q)','Q',%pi/6,%pi/3)*integrate('(1+p)','p',2,5);
+disp(C2,'C2=');
+disp('Since C1=C2 hence stroke theorem is proved');
+
diff --git a/42/CH4/EX4.1/sadiku_4_1.sce b/42/CH4/EX4.1/sadiku_4_1.sce new file mode 100755 index 000000000..f93360bff --- /dev/null +++ b/42/CH4/EX4.1/sadiku_4_1.sce @@ -0,0 +1,16 @@ +clear; +clc; +format('v',6); +Q1=1; +Q2=-2; +Q=10*10^-9; +P1=[0 3 1]-[3 2 -1]; +P2=[0 3 1]-[-1 -1 4]; + +e=10^-9/(36*%pi); +det1=(P1(1,1)^2+P1(1,2)^2+P1(1,3)^2)^.5; +det2=(P2(1,1)^2+P2(1,2)^2+P2(1,3)^2)^.5; +F=[[(Q*Q1)*(P1)]/(4*%pi*e*(det1)^3)]+[[(Q*Q2)*(P2)]/(4*%pi*e*(det2)^3)]; +E=[(10^-6)*(F/Q)]; +disp(F,'F(in mN)='); +disp(E,'At that point E(in kV)=');
\ No newline at end of file diff --git a/42/CH4/EX4.10/sadiku_4_10.sce b/42/CH4/EX4.10/sadiku_4_10.sce new file mode 100755 index 000000000..2c7e2008a --- /dev/null +++ b/42/CH4/EX4.10/sadiku_4_10.sce @@ -0,0 +1,13 @@ +clear; +clc; +format('v',6); +Q1=-4; +Q2=5; +R1=[1 0 1]-[2 -1 3]; +R2=[1 0 1]-[0 4 -2]; +e=10^-9/(36*%pi); +mod_R1=(R1(1,1)^2+R1(1,2)^2+R1(1,3)^2)^.5; +mod_R2=(R2(1,1)^2+R2(1,2)^2+R2(1,3)^2)^.5; +C0=0; +V=10^-6*(([Q1/mod_R1]+[Q2/mod_R2])/(4*%pi*e))+C0; +disp(V*10^-3,'V(1,0,1)(in kV)=');
\ No newline at end of file diff --git a/42/CH4/EX4.12/sadiku_4_12.sce b/42/CH4/EX4.12/sadiku_4_12.sce new file mode 100755 index 000000000..a3ca49a7b --- /dev/null +++ b/42/CH4/EX4.12/sadiku_4_12.sce @@ -0,0 +1,10 @@ +clear;
+clc;
+q=10*10^-6;
+function[V]=pot(r,P,Q);
+V=10*sin(P)*cos(Q)/r^2;
+endfunction
+Va=pot(1,%pi/6,2*%pi/3);
+Vb=pot(4,%pi/2,%pi/3);
+W=q*(Vb-Va);
+disp(W*10^6,'Work done in uJoule');
\ No newline at end of file diff --git a/42/CH4/EX4.13/sadiku_4_13.sce b/42/CH4/EX4.13/sadiku_4_13.sce new file mode 100755 index 000000000..221a35756 --- /dev/null +++ b/42/CH4/EX4.13/sadiku_4_13.sce @@ -0,0 +1,6 @@ +clear;
+clc;
+p1=-5*10^-9, p2=9*10^-9;
+r1=2,r2=-3,e=10^-9/(36*%pi);
+V=(1/(4*%pi*e))*((p1*abs(r1)/r1^3)+(p2*abs(r2)/r2^3));
+disp(V);
\ No newline at end of file diff --git a/42/CH4/EX4.14/sadiku_4_14.sce b/42/CH4/EX4.14/sadiku_4_14.sce new file mode 100755 index 000000000..77309a283 --- /dev/null +++ b/42/CH4/EX4.14/sadiku_4_14.sce @@ -0,0 +1,7 @@ +clear;
+clc;
+format('v',6);
+Q1=-1*10^-9 ,Q2=4*10^-9,Q3=3*10^-9,e=10^-9/(36*%pi);
+V1=(1/(4*%pi*e) * (Q2+Q3)),V2=(1/(4*%pi*e)*(Q1+Q3/(2^.5)) ),V3=(1/(4*%pi*e) * (Q1+Q2/(2^.5)));
+W=.5*((V1*Q1)+(V2*Q2)+(V3*Q3));
+disp(W*10^9,'Energy in nJ');
\ No newline at end of file diff --git a/42/CH4/EX4.6/sadiku_4_6.sce b/42/CH4/EX4.6/sadiku_4_6.sce new file mode 100755 index 000000000..acb9d7144 --- /dev/null +++ b/42/CH4/EX4.6/sadiku_4_6.sce @@ -0,0 +1,15 @@ +clear;
+clc;
+format('v',6);
+p1=10*10^-9;
+p2=15*10^-9;
+pl=10*%pi*10^-9;
+e=(10^-9)/(36*%pi);
+E1=(p1/(2*e))*[-1 0 0];
+E2=(p2/(2*e))*[0 1 0];
+R=[1 0 -3];
+p=(R(1,1)^2+R(1,2)^2+R(1,3)^2);
+a=R/p;
+E3=(pl/(2*%pi*e))*a;
+E=E1+E2+E3;
+disp(E,'E(in V) at (1,1,-1)=');
\ No newline at end of file diff --git a/42/CH4/EX4.7/sadiku_4_7.sce b/42/CH4/EX4.7/sadiku_4_7.sce new file mode 100755 index 000000000..2f05d77d3 --- /dev/null +++ b/42/CH4/EX4.7/sadiku_4_7.sce @@ -0,0 +1,16 @@ +clear; +clc; +format('v',12); +e=10^-9; +Q=-5*%pi*10^-3; +pl=3*%pi*10^-3; +r=[4 0 3]; +p=(r(1,1)^2+r(1,2)^2+r(1,3)^2)^.5; +r1=[4,0,0]; +R=r-r1; +mod_R=(R(1,1)^2+R(1,2)^2+R(1,3)^2)^.5; +Dq=(Q*R)/(4*%pi*mod_R^3); +ap=r/p; +Dl=(pl/(2*%pi*p))*ap; +D=Dq+Dl; +disp(D*10^6,'Flux density D(in microC) due to a point charge and a infinite line charge');
\ No newline at end of file diff --git a/42/CH4/EX4.8/sadiku_4_8.sce b/42/CH4/EX4.8/sadiku_4_8.sce new file mode 100755 index 000000000..9fc783845 --- /dev/null +++ b/42/CH4/EX4.8/sadiku_4_8.sce @@ -0,0 +1,5 @@ +clear;
+clc;
+r1=0,r2=1,z1=-2,z2=2,q1=0,q2=2*%pi;
+Q=integrate('p^2','p',r1,r2)*integrate('(cos(Q)^2)','Q',q1,q2)*integrate('1','z',z1,z2);
+disp(Q,'Total charge is =');
\ No newline at end of file diff --git a/42/CH5/EX5.1/sadiku_5_1.sce b/42/CH5/EX5.1/sadiku_5_1.sce new file mode 100755 index 000000000..e04e8159e --- /dev/null +++ b/42/CH5/EX5.1/sadiku_5_1.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+r=.2;
+disp('J=1/r3(2cosP ar + sinP a)')
+I=(2/r)*integrate('sin(P)*cos(P)','P',0,%pi/2)*integrate('1','Q',0,2*%pi);
+disp(I,'Current passing through Hemispherical shell');
+I=(2/r)*integrate('sin(P)*cos(P)','P',0,%pi,10^-10)*integrate('1','Q',0,2*%pi);
+disp(I,' Current through spherical shell= ');
\ No newline at end of file diff --git a/42/CH5/EX5.10/sadiku_5_10.sce b/42/CH5/EX5.10/sadiku_5_10.sce new file mode 100755 index 000000000..b99626f49 --- /dev/null +++ b/42/CH5/EX5.10/sadiku_5_10.sce @@ -0,0 +1,12 @@ +clear; +clc; +format('v',12); +disp(0,'Point(3,-2,2) is in conductor region hence E=D='); +ps=2; +Dn=ps; +D=[0 Dn 0]; +e=(10^-9)/(36*%pi); +er=2; +E=D/(e*er); +disp(D,'D='); +disp(E,'E='); diff --git a/42/CH5/EX5.2/sadiku_5_2.sce b/42/CH5/EX5.2/sadiku_5_2.sce new file mode 100755 index 000000000..21ac4b7b2 --- /dev/null +++ b/42/CH5/EX5.2/sadiku_5_2.sce @@ -0,0 +1,10 @@ +clear;
+clc;
+format('v',12);
+ps=10^-7;
+u=2;
+w=0.1;
+t=5;
+I=ps*u*w;
+Q=I*t*10^9;
+disp(Q,'charge(in nC) collected in 5 sec=');
\ No newline at end of file diff --git a/42/CH5/EX5.3/sadiku_5_3.sce b/42/CH5/EX5.3/sadiku_5_3.sce new file mode 100755 index 000000000..c0c3cb9a9 --- /dev/null +++ b/42/CH5/EX5.3/sadiku_5_3.sce @@ -0,0 +1,18 @@ +clear;
+clc;
+format('v',12);
+n=10^29;
+e=-1.6*10^-19;
+pv=n*e;
+disp(pv*10^-6,'(a) pv(in MC/m3)=');
+sigma=5*10^7;
+E=10^-2;
+J=sigma*E;
+disp(J*10^-3,'(b) J(in kA/m2)=');
+S=(%pi*10^-6)/4;
+I=J*S;
+format('v',6);
+disp(I,'(c) I(in A)=');
+u=J/pv;
+format('v',12);
+disp(u,'(d) u(in m/s)=');
\ No newline at end of file diff --git a/42/CH5/EX5.4/sadiku_5_4.sce b/42/CH5/EX5.4/sadiku_5_4.sce new file mode 100755 index 000000000..47ac6c7c5 --- /dev/null +++ b/42/CH5/EX5.4/sadiku_5_4.sce @@ -0,0 +1,10 @@ +clear;
+clc;
+format('v',6);
+l=4;
+d=3;
+r=0.5;
+S=(d^2-(%pi*r^2))*10^-4;
+sigma=5*10^6;
+R=(l*10^6)/(sigma*S);
+disp(R,'R(in microohm)=');
\ No newline at end of file diff --git a/42/CH5/EX5.6/sadiku_5_6.sce b/42/CH5/EX5.6/sadiku_5_6.sce new file mode 100755 index 000000000..9c7a1f946 --- /dev/null +++ b/42/CH5/EX5.6/sadiku_5_6.sce @@ -0,0 +1,18 @@ +clear; +clc; +format('v',6); +e0=10^-9/(36*%pi); +er=2.55; +E=10^4; +d=1.5*10^-3; +D=e0*er*E*10^9; +disp(D,'D(in nC/m^2)='); +xe=1.55; +P=xe*e0*E*10^9; +disp(P,'P(in nC/m^2)='); +ps=D; +disp(ps,'ps(in nC/m^2)='); +pps=P; +disp(pps,'pps(in nC/m^2)='); +V=E*d; +disp(V,'V(in V)=');
\ No newline at end of file diff --git a/42/CH5/EX5.7/sadiku_5_7.sce b/42/CH5/EX5.7/sadiku_5_7.sce new file mode 100755 index 000000000..38d11614b --- /dev/null +++ b/42/CH5/EX5.7/sadiku_5_7.sce @@ -0,0 +1,15 @@ +clear; +clc; +format('v',6); +Q=2*10^-12; +e0=(10^-9)/(36*%pi); +er=5.7; +xr=er-1; +r=10^-1; +E=Q*10^12/(4*%pi*e0*er*r^2); +P=xr*e0*E; +pps=P*1; +disp(pps,'(a) pps(in pC/m^2)='); +Q1=-4*10^-12; +F=(Q*Q1)*10^12/(4*%pi*e0*er*r^2); +disp(F,'(b) F(in pN)(in the direction of ar)=');
\ No newline at end of file diff --git a/42/CH5/EX5.9/sadiku_5_9.sce b/42/CH5/EX5.9/sadiku_5_9.sce new file mode 100755 index 000000000..5e10dd01e --- /dev/null +++ b/42/CH5/EX5.9/sadiku_5_9.sce @@ -0,0 +1,28 @@ +clear; +clc; +format('v',6); +an=[0 0 1]; +E1=[5 -2 3]; +er1=4; +er2=3; +e=(10^-9)/(36*%pi); +e1n=E1*an'; +E1n=[0 0 e1n]; +E2n=[0 0 E1n*[0;0;1]]; +E1t=E1-E1n; +E2t=E1t; +E2n=(er1*E1n)/er2; +E2=E2t+E2n; +disp(E2,'E2='); +theta1=atand(((E1t(1,1)^2+E1t(1,2)^2+E1t(1,3)^2)^0.5)/e1n); +alpha1=90-theta1; +disp(alpha1,'Angle of E1 with interface='); +alpha2=90-atand(((E2t(1,1)^2+E2t(1,2)^2+E2t(1,3)^2)^0.5)/((E2n(1,1)^2+E2n(1,2)^2+E2n(1,3)^2)^0.5)); +disp(alpha2,'Angle of E2 with interface='); +wE1=0.5*er1*e*10^12*(E1(1,1)^2+E1(1,2)^2+E1(1,3)^2); +wE2=0.5*er2*e*10^12*(E2(1,1)^2+E2(1,2)^2+E2(1,3)^2); +disp(wE1,'Energy densities are wE1(in uJ)='); +disp(wE2,' wE2(in uJ)='); +We=wE2*integrate('1','x',2,4)*integrate('1','y',3,5)*integrate('1','z',-6,-4)*10^-3; +disp(We,'We(in mJ)='); + diff --git a/42/CH6/EX6.12/sadiku_6_12.sce b/42/CH6/EX6.12/sadiku_6_12.sce new file mode 100755 index 000000000..f7d4d44b8 --- /dev/null +++ b/42/CH6/EX6.12/sadiku_6_12.sce @@ -0,0 +1,11 @@ +clear;
+clc;
+Eo=10^-9 /(36*%pi),Er1=4,Er2=6,d=5*10^-3,S=30*10^-4;
+C1=Eo*Er1*S*2/d;
+C2=Eo*Er2*S*2/d;
+C=C1*C2/(C1+C2);//Since they are in series
+disp(C*10^12,'Capacitance of capacitor in figure a in pF =');
+C1=Eo*Er1*S/(2*d);
+C2=Eo*Er2*S/(2*d);
+C=C1+C2;
+disp(C*10^12,'Capacitance of capacitor in figure b in pF = ')
\ No newline at end of file diff --git a/42/CH7/EX7.1/sadiku_7_1.sce b/42/CH7/EX7.1/sadiku_7_1.sce new file mode 100755 index 000000000..4d78bd6ba --- /dev/null +++ b/42/CH7/EX7.1/sadiku_7_1.sce @@ -0,0 +1,5 @@ +clear;
+clc;
+a1=acos(0),a2=acos(2/29^.5),p=5,I=10;
+H=I/(4*%pi*p)*(cos(a1)-cos(a2));
+disp(H*1000,'H at (0,0,5) in mA ');
\ No newline at end of file diff --git a/42/CH7/EX7.2/sadiku_7_2.sce b/42/CH7/EX7.2/sadiku_7_2.sce new file mode 100755 index 000000000..e5c48bdf7 --- /dev/null +++ b/42/CH7/EX7.2/sadiku_7_2.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+a1=acos(0),a2=acos(1),p=5,I=3;
+Hz=I/(4*%pi*p)*(cos(a2)-cos(a1))*[.8 .6 0];
+a2=acos(1),a1=acos(.6),p=4,I=3;
+Hx=I/(4*%pi*p)*(cos(a2)-cos(a1))*[0 0 1];
+H=Hx+Hz;
+disp(H*1000,'H at (0,0,5) in mA ');
\ No newline at end of file diff --git a/42/CH7/EX7.5/sadiku_7_5.sce b/42/CH7/EX7.5/sadiku_7_5.sce new file mode 100755 index 000000000..6c15dbcb5 --- /dev/null +++ b/42/CH7/EX7.5/sadiku_7_5.sce @@ -0,0 +1,11 @@ +clear;
+clc;
+i0=-10,i4=10;
+H0=.5*i0*-1;// in the positive Y direction
+H4=.5*i4*-1*-1;//in the positive Y direction
+H=H0+H4;
+disp(H, 'H at (1,1,1) =')
+H0=.5*i0*-1;//in the positive Y direction
+H4=.5*i4*-1;//in the negative Y direction
+H=H0+H4;
+disp(H,'H at (0,-3,10 =)');
\ No newline at end of file diff --git a/42/CH7/EX7.7/sadiku_7_7.sce b/42/CH7/EX7.7/sadiku_7_7.sce new file mode 100755 index 000000000..b5748756c --- /dev/null +++ b/42/CH7/EX7.7/sadiku_7_7.sce @@ -0,0 +1,6 @@ +clear;
+clc;
+disp('Vector potential A=-p^2/4');
+Q=%pi/2,p1=1,p2=2,z1=0,z2=5
+Y=.5*integrate('p','p',p1,p2)*integrate('1','z',z1,z2);
+disp(Y,'Total magnetic flux= ')
\ No newline at end of file diff --git a/42/CH8/EX8.1/sadiku_8_1.sce b/42/CH8/EX8.1/sadiku_8_1.sce new file mode 100755 index 000000000..2d37b2dfe --- /dev/null +++ b/42/CH8/EX8.1/sadiku_8_1.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+m=2,q=3,v=[4 0 3],E=[12 10 0],t=1;
+disp(q*E/m,'Acceleration ofthe particle= ');
+u=[22 15 3];
+modofu=sqrt(22*22+15*15+3*3);
+KE=.5*m*(modofu)^2;
+disp(KE, 'Kinetic energy= ')
\ No newline at end of file diff --git a/42/CH8/EX8.14/sadiku_8_14.sce b/42/CH8/EX8.14/sadiku_8_14.sce new file mode 100755 index 000000000..29e271009 --- /dev/null +++ b/42/CH8/EX8.14/sadiku_8_14.sce @@ -0,0 +1,6 @@ +clear;
+clc;
+p=10*10^-2 ,a=1*10^-2 ,Ur=1000, Uo=4*%pi*10^-7,n=200,phi=.5*10^-3;
+U=Uo*Ur;
+I=phi*2*%pi*p/(Uo*Ur*n*%pi*a*a);
+disp(I);
\ No newline at end of file diff --git a/42/CH8/EX8.15/sadiku_8_15.sce b/42/CH8/EX8.15/sadiku_8_15.sce new file mode 100755 index 000000000..82760908c --- /dev/null +++ b/42/CH8/EX8.15/sadiku_8_15.sce @@ -0,0 +1,10 @@ +clear;
+clc;
+Uo=4*%pi*10^-7,Ur=50,l1=30*10^-2,s=10*10^-4,l3=9*10^-2,la=1*10^-2,B=1.5,N=400;
+R1=l1/(Uo*Ur*s);R2=R1;
+R3=l3/(Uo*Ur*s);
+Ra=la/(Uo*s);
+R=R1*R2/(R1+R2);
+Req=R3+Ra+R;
+I=B*s*Req/N;
+disp(I,'Required current= ');
diff --git a/42/CH8/EX8.16/sadiku_8_16.sce b/42/CH8/EX8.16/sadiku_8_16.sce new file mode 100755 index 000000000..f371b3003 --- /dev/null +++ b/42/CH8/EX8.16/sadiku_8_16.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+m=400,g=9.8,Ur=3000, Uo=4*%pi*10^-7,S=40*10^-4,la=1*10^-4,li=50*10^-2,I=1;
+B=sqrt(m*g*Uo/S);
+Ra=2*la/(Uo*S);
+Ri=li/(Uo*Ur*S);
+N=(Ra+Ri)/(Ra*Uo)*B*la;
+disp(N,'No of turns= ');
\ No newline at end of file diff --git a/42/CH8/EX8.8/sadiku_8_8.sce b/42/CH8/EX8.8/sadiku_8_8.sce new file mode 100755 index 000000000..094dea3fa --- /dev/null +++ b/42/CH8/EX8.8/sadiku_8_8.sce @@ -0,0 +1,9 @@ +clear;
+clc;
+format('v',6);
+H1=[-2 6 4],Uo=4*%pi*10^-7,Ur=5;
+U1=Uo*Ur;
+M1=(Ur-1)*H1;
+disp(M1,'M = ');
+B1=U1*H1;
+disp(B1*10^6,'B in uW/m^2');
\ No newline at end of file diff --git a/42/CH9/EX9.5/sadiku_9_5.sce b/42/CH9/EX9.5/sadiku_9_5.sce new file mode 100755 index 000000000..e446f74e4 --- /dev/null +++ b/42/CH9/EX9.5/sadiku_9_5.sce @@ -0,0 +1,8 @@ +clear;
+clc;
+z3=%i,z4=3+4*%i,z5=-1+6*%i,z6=3+4*%i;
+z1=(z3*z4/(z5*z6));
+disp(z1,'z1 =');
+z7=1+%i, z8=4-8*%i;
+z2=(z7/z8)^.5;
+disp(z2,'z2 = ')
\ No newline at end of file |