summaryrefslogtreecommitdiff
path: root/2795/CH5/EX5.13
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2795/CH5/EX5.13
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2795/CH5/EX5.13')
-rwxr-xr-x2795/CH5/EX5.13/Ex5_13.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/2795/CH5/EX5.13/Ex5_13.sce b/2795/CH5/EX5.13/Ex5_13.sce
new file mode 100755
index 000000000..9436642c3
--- /dev/null
+++ b/2795/CH5/EX5.13/Ex5_13.sce
@@ -0,0 +1,14 @@
+// Scilab Code Ex5.13 : Page-195 (2014)
+clc; clear;
+n = [1 2 3]; // First three energy levels
+e = 1.6e-019; // Energy equivalent of 1 eV, J/eV
+c = 3e008; // Speed of light, m/s
+h = 6.63e-034; // Planck's constant, Js
+m = 9.1e-031; // Mass of the proton, kg
+l = 0.1; // Length of one-dimensional box, nm
+E_n = n^2*(h*c/(e*1e-009))^2/(8*m*c^2/e*l^2); // Energy of nth level, eV
+printf("\nThe first three energy level are:\nE1 = %2.0f eV, E2 = %3.0f eV and E3 = %3.0f eV", E_n(1), E_n(2), E_n(3));
+
+// Result
+// The first three energy level are:
+// E1 = 38 eV, E2 = 151 eV and E3 = 340 eV \ No newline at end of file