From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2681/CH1/EX1.1/Ex1_1.sce | 17 +++++++++++++++++ 2681/CH1/EX1.10/Ex1_10.sce | 14 ++++++++++++++ 2681/CH1/EX1.11/Ex1_11.sce | 14 ++++++++++++++ 2681/CH1/EX1.12/Ex1_12.sce | 10 ++++++++++ 2681/CH1/EX1.13/Ex1_13.sce | 8 ++++++++ 2681/CH1/EX1.14/Ex1_14.sce | 18 ++++++++++++++++++ 2681/CH1/EX1.15/Ex1_15.sce | 8 ++++++++ 2681/CH1/EX1.2/Ex1_2.sce | 15 +++++++++++++++ 2681/CH1/EX1.3/Ex1_3.sce | 9 +++++++++ 2681/CH1/EX1.4/Ex1_4.sce | 15 +++++++++++++++ 2681/CH1/EX1.5/Ex1_5.sce | 13 +++++++++++++ 2681/CH1/EX1.6/Ex1_6.sce | 7 +++++++ 2681/CH1/EX1.7/Ex1_7.sce | 7 +++++++ 13 files changed, 155 insertions(+) create mode 100755 2681/CH1/EX1.1/Ex1_1.sce create mode 100755 2681/CH1/EX1.10/Ex1_10.sce create mode 100755 2681/CH1/EX1.11/Ex1_11.sce create mode 100755 2681/CH1/EX1.12/Ex1_12.sce create mode 100755 2681/CH1/EX1.13/Ex1_13.sce create mode 100755 2681/CH1/EX1.14/Ex1_14.sce create mode 100755 2681/CH1/EX1.15/Ex1_15.sce create mode 100755 2681/CH1/EX1.2/Ex1_2.sce create mode 100755 2681/CH1/EX1.3/Ex1_3.sce create mode 100755 2681/CH1/EX1.4/Ex1_4.sce create mode 100755 2681/CH1/EX1.5/Ex1_5.sce create mode 100755 2681/CH1/EX1.6/Ex1_6.sce create mode 100755 2681/CH1/EX1.7/Ex1_7.sce (limited to '2681/CH1') diff --git a/2681/CH1/EX1.1/Ex1_1.sce b/2681/CH1/EX1.1/Ex1_1.sce new file mode 100755 index 000000000..85a1fc59b --- /dev/null +++ b/2681/CH1/EX1.1/Ex1_1.sce @@ -0,0 +1,17 @@ +//calculate the electric field,its magnitude and direction. +//given +F=[2 1 1]//force vector in newton +Q=1//charge in columbs +E=F/Q//the electric field +//the magnitude of this field is given by: +e=norm(E) +//THE direction of the electric field is given by: +aE=E/e +e=round(e*1000)/1000//rounding off decimals +aE=round(aE*1000)/1000//rounding off decimals +disp(E,'the electric field is given by:' )//N/C +disp(e,'the magnitude of the electric field E:')//V/m +disp(aE,'THE direction of the electric field in x,y,z axis respectively :') + + + diff --git a/2681/CH1/EX1.10/Ex1_10.sce b/2681/CH1/EX1.10/Ex1_10.sce new file mode 100755 index 000000000..49ccbf467 --- /dev/null +++ b/2681/CH1/EX1.10/Ex1_10.sce @@ -0,0 +1,14 @@ +//FIND THE DIRECTION OF POWER FLOW OF MICROWAVE +//given +clc +function w=cross_prod(E,F)//function to determine the cross product of two vectors +D=[E(:),F(:)] +w(1)=det([[1;0;0],D]) +w(2)=det([[0;1;0],D]) +w(3)=det([[0;0;1],D]) +endfunction +E=[0 1 0] +F=[1 0 0] +q=cross_prod(E,F) +disp(q','the cross product of the given fields')//towards az +//ERROR in book as cross product of two perpendicular vector gives the third diff --git a/2681/CH1/EX1.11/Ex1_11.sce b/2681/CH1/EX1.11/Ex1_11.sce new file mode 100755 index 000000000..bafb4438f --- /dev/null +++ b/2681/CH1/EX1.11/Ex1_11.sce @@ -0,0 +1,14 @@ +//find pointing vector and direction of power flow of microwave +//given +clc +function w=cross_prod(E,H)//function to determine the cross product of two vector +D=[E(:),H(:)] +w(1)=det([[1;0;0],D]) +w(2)=det([[0;1;0],D]) +w(3)=det([[0;0;1],D]) +endfunction +E=1*[1 0 0]//electric field towards ax +H=2*[0 1 0]//magnetic field towards ay +q=cross_prod(E,H) +disp(q','the display is along az axis')//along az +//ERROR in the book as cross product of two perpendicular vector is the third vector diff --git a/2681/CH1/EX1.12/Ex1_12.sce b/2681/CH1/EX1.12/Ex1_12.sce new file mode 100755 index 000000000..55976ed4d --- /dev/null +++ b/2681/CH1/EX1.12/Ex1_12.sce @@ -0,0 +1,10 @@ +//find the frequency of the wave +//given +clc +t1=100d-12 +t2=500d-12 +t3=1d-9 +f1=t1^-1 +f2=t2^-1 +f3=t3^-1 +disp(f3*1D-9,f2*1D-9,f1*1D-9,'the frequencies respectively')//in GHz diff --git a/2681/CH1/EX1.13/Ex1_13.sce b/2681/CH1/EX1.13/Ex1_13.sce new file mode 100755 index 000000000..1bf377d33 --- /dev/null +++ b/2681/CH1/EX1.13/Ex1_13.sce @@ -0,0 +1,8 @@ +//determine the velocity of propogation of microwave +//given +clc +ur=1//permeability in H/m +epsilonr=4//permittivity in F/m +k=3d+8//the speed of light in vaccum +v=k/((ur*epsilonr)^1/2)//velocity of microwave +disp(v,'the velocity of propogation of microwave in m/s:')//velocity in m/s diff --git a/2681/CH1/EX1.14/Ex1_14.sce b/2681/CH1/EX1.14/Ex1_14.sce new file mode 100755 index 000000000..bde3da61c --- /dev/null +++ b/2681/CH1/EX1.14/Ex1_14.sce @@ -0,0 +1,18 @@ +//find the wavelength of microwave frequency +//given +clc +v0=3d+8//velocity in m/s +function[lem]=wavelength(v0,fr) +lem=v0/fr//calculating wavelength +endfunction +fr=1d+6//frequency in MHz +[lem1]=wavelength(v0,fr) +fr=1d+7//frequency in MHz +[lem2]=wavelength(v0,fr) +fr=1d+8//frequency in MHz +[lem3]=wavelength(v0,fr) +fr=1d+9//frequency in MHz +[lem4]=wavelength(v0,fr) +fr=1d+10//frequency in MHz +[lem5]=wavelength(v0,fr) +disp(lem5,lem4,lem3,lem2,lem1,'the wavelength for given values of frequency in meter')//wavelength in meter diff --git a/2681/CH1/EX1.15/Ex1_15.sce b/2681/CH1/EX1.15/Ex1_15.sce new file mode 100755 index 000000000..9113bb8bf --- /dev/null +++ b/2681/CH1/EX1.15/Ex1_15.sce @@ -0,0 +1,8 @@ +//find the phase shift of the wave +//given +f=1d+9//Hz +v0=3d+8//m/s +lem=v0/f//calculating wavelength +b=2*%pi/lem//calculating phase shift +b=round(b*100)/100///rounding off decimals +disp(b,lem,'the wavelength and phase shift respectively')//in rad/m and m diff --git a/2681/CH1/EX1.2/Ex1_2.sce b/2681/CH1/EX1.2/Ex1_2.sce new file mode 100755 index 000000000..42aa98b74 --- /dev/null +++ b/2681/CH1/EX1.2/Ex1_2.sce @@ -0,0 +1,15 @@ +//determine the electric field at a point; +//given +clc +Qf=2d-6 +Qt=1d-6 +rf=[1 0 0]//this can also be written as ax +rt=[0 1 0]//this can also be written as ay +rtf=rt-rf +Rtf=norm(rtf)//this is the magnitude of the vector +atf=rtf/Rtf//the unit vector across the two points p1 and p2 +//the electric field at the point p2 is given by: +epsilon0=8.85D-12//value may differ, as i have not used the estimated value +E=((Qf*Qt)/(4*%pi*epsilon0*(Rtf)^2))*atf//electric field calculation +E=round(E*1d+6)/1d+6///rounding off decimals +disp(E*1d+3,'the electric field of p2 is:')//mN/C diff --git a/2681/CH1/EX1.3/Ex1_3.sce b/2681/CH1/EX1.3/Ex1_3.sce new file mode 100755 index 000000000..6046dd1bd --- /dev/null +++ b/2681/CH1/EX1.3/Ex1_3.sce @@ -0,0 +1,9 @@ +//DETERMINE TOTAL FIELD AT A POINT ,P DUE TO ALL THE THREE CHARGES. +//given +clc +E1=[1 2 -1]//at p due to 1uc +E2=[0 1 3]//due to 2uc +E3=[2 -1 0]//due to 3uc +//total field at p due to all these three charges is given by: +E=E1+E2+E3//resultant of all the three charges +disp(E,'the fiel at point p due to all the charges')//N/C diff --git a/2681/CH1/EX1.4/Ex1_4.sce b/2681/CH1/EX1.4/Ex1_4.sce new file mode 100755 index 000000000..f3fe6fdd5 --- /dev/null +++ b/2681/CH1/EX1.4/Ex1_4.sce @@ -0,0 +1,15 @@ +//determine the charge Q at the point (2,0,0). +//given +clc +Q1=-10D-9//coulombs +epsilon0=8.85d-12//permitivity of free space +r1=[3 1 1]-[0 0 0] +r2=[3 1 1]-[2 0 0] +R1=norm(r1)//magnitude of the given vector r1 +R2=norm(r2)//magnitude of vector r2 +ar1=r1/R1//unit vector +ar2=r2/R2//unit vector +deff("[Qt]=electricfield(E)","Qt=((E-((Q1/(4*%pi*epsilon0*R1^2))*ar1(1,1)))/ar2(1,1))*(4*%pi*epsilon0*R2^2)") +Qt=electricfield(0)//in coulombs +Qt=round(Qt*1d+11)/1d+11///rounding off decimals +disp(Qt/1d-9,'the electrical field at the point [2,0,0] in nC')//nC diff --git a/2681/CH1/EX1.5/Ex1_5.sce b/2681/CH1/EX1.5/Ex1_5.sce new file mode 100755 index 000000000..f94bdbf61 --- /dev/null +++ b/2681/CH1/EX1.5/Ex1_5.sce @@ -0,0 +1,13 @@ +//the electric field at Q1 needed to be determined. +//given +clc +Q1=1d-9//at (-1,1,-3) +Q2=5d-9//at (3,1,0) +epsilon0=8.85D-12//the values may differ as i have used the exact value of permitivity +R=[-1 1 -3]-[3 1 0]// +r=norm(R)//magnitude of the vector r +ar=R/r//unit vector +E=(Q1/(4*%pi*epsilon0*(r^2)))*ar +E=round(E*10000)/10000///rounding off decimals +disp(E,'THE electric field at Q1 is given as:')//both vectors are in ax and az directions respectively +//ERROR in the book diff --git a/2681/CH1/EX1.6/Ex1_6.sce b/2681/CH1/EX1.6/Ex1_6.sce new file mode 100755 index 000000000..ffa79791b --- /dev/null +++ b/2681/CH1/EX1.6/Ex1_6.sce @@ -0,0 +1,7 @@ +//determine the electric field at location of 3 coulombs +//given +clc +fr=12d-3// N +Qt=3//C +E=fr/Qt//electric field +disp(E*1000,'the electricfield at 3c')//mN/C diff --git a/2681/CH1/EX1.7/Ex1_7.sce b/2681/CH1/EX1.7/Ex1_7.sce new file mode 100755 index 000000000..38da18328 --- /dev/null +++ b/2681/CH1/EX1.7/Ex1_7.sce @@ -0,0 +1,7 @@ +//find the magnetic field at distance of 2m in free space +//given +clc +fr=3d-3//IN Newtons +mt=2//meters +H=fr/mt//magnetic field +disp(H*1d+3,'THE magnetic field:')//mN/Wb -- cgit