summaryrefslogtreecommitdiff
path: root/1952/CH7
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:38:01 +0530
committerprashantsinalkar2017-10-10 12:38:01 +0530
commitf35ea80659b6a49d1bb2ce1d7d002583f3f40947 (patch)
treeeb72842d800ac1233e9d890e020eac5fd41b0b1b /1952/CH7
parent7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (diff)
downloadScilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.gz
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.tar.bz2
Scilab-TBC-Uploads-f35ea80659b6a49d1bb2ce1d7d002583f3f40947.zip
updated the code
Diffstat (limited to '1952/CH7')
-rwxr-xr-x1952/CH7/EX7.2/Ex7_2.sce55
1 files changed, 27 insertions, 28 deletions
diff --git a/1952/CH7/EX7.2/Ex7_2.sce b/1952/CH7/EX7.2/Ex7_2.sce
index 0d534a552..fb1c40a9c 100755
--- a/1952/CH7/EX7.2/Ex7_2.sce
+++ b/1952/CH7/EX7.2/Ex7_2.sce
@@ -1,28 +1,27 @@
-// chapter 7 , Example 7.2 , pg 208
-ni=1.5*10^10 //intrinsic concentration (in cm^-3)
-Nd=10^16 //donor concentration (in atoms/cm^3)
-T=300 //temperature (in K)
-e=1.6*10^-19 //charge of electron (in C)
-k=1.38*10^-23 //Boltzmann constant (in J/K)
-n0=Nd //Assuming n0=Nd ( since Nd >> ni)
-p0=ni^2/n0 //hole concentration
-E=k*T*log(n0/ni) // E=(Ef-Ei) location of Ef relative to Ei
-printf("Hole concentration (in cm^-3)")
-disp(p0)
-printf("Location of Ef relative to Ei (in eV)")
-disp(E/e)
-x = linspace(-5.5,5.5,51);
-y = 1 ;
-
-scf(2);
-clf(2);
-plot(x,y+0.1);
-
-plot(x,y,'ro-');
-plot(x,y-0.347,'--');
-plot(x,y*0,'bs:');
-xlabel(["x axis";"(independent variable)"]);
-ylabel("Energy level (eV)");
-title("Band diagram");
-legend(["Ec";"Ef";"Ei";"Ev"]);
-set(gca(),"data_bounds",matrix([-6,6,-0.1,1.1],2,-1));
+// chapter 7 , Example 7.2 , pg 208
+ni=1.5*10^10 //intrinsic concentration (in cm^-3)
+Nd=10^16 //donor concentration (in atoms/cm^3)
+T=300 //temperature (in K)
+e=1.6*10^-19 //charge of electron (in C)
+k=1.38*10^-23 //Boltzmann constant (in J/K)
+n0=Nd //Assuming n0=Nd ( since Nd >> ni)
+p0=ni^2/n0 //hole concentration
+E=k*T*log(n0/ni) // E=(Ef-Ei) location of Ef relative to Ei
+printf("Hole concentration (in cm^-3)")
+disp(p0)
+printf("Location of Ef relative to Ei (in eV)")
+disp(E/e)
+x = linspace(-5.5,5.5,51);
+y = ones(length(x),1);
+
+scf(2);
+clf(2);
+plot(x,y+0.1);
+
+plot(x,y,'ro-');
+plot(x,y-0.347,'--');
+plot(x,y*0,'bs:');
+xlabel(["x axis";"(independent variable)"]);
+ylabel("Energy level (eV)");
+title("Band diagram");
+set(gca(),"data_bounds",matrix([-6,6,-0.1,1.1],2,-1)); \ No newline at end of file