summaryrefslogtreecommitdiff
path: root/3014/CH2/EX2.28/Ex2_28.sce
diff options
context:
space:
mode:
Diffstat (limited to '3014/CH2/EX2.28/Ex2_28.sce')
-rwxr-xr-x3014/CH2/EX2.28/Ex2_28.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/3014/CH2/EX2.28/Ex2_28.sce b/3014/CH2/EX2.28/Ex2_28.sce
new file mode 100755
index 000000000..bb8cb9c91
--- /dev/null
+++ b/3014/CH2/EX2.28/Ex2_28.sce
@@ -0,0 +1,13 @@
+clc
+
+//given that
+l = 1 // width of potential well in angstrom
+h = 6.63e-34 // Plank constant
+m = 9.1e-31 // mass of electron in Kg
+printf("Example 2.28")
+for n = 1:3
+ lambda = 2*l/n // Calculation of wavelength
+ E = n^2*h^2/(8*m*(l*1e-10)^2) // Calculation of energy in Joule
+E_eV = E/1.6e-19 // Calculation of energy in eV
+printf("\n For state:%d Energy is %f eV & wavelength is %f angstrom ",n,E_eV,lambda);
+end