summaryrefslogtreecommitdiff
path: root/1271/CH15/EX15.16/example15_16.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1271/CH15/EX15.16/example15_16.sce
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 '1271/CH15/EX15.16/example15_16.sce')
-rwxr-xr-x1271/CH15/EX15.16/example15_16.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/1271/CH15/EX15.16/example15_16.sce b/1271/CH15/EX15.16/example15_16.sce
new file mode 100755
index 000000000..f53857a6d
--- /dev/null
+++ b/1271/CH15/EX15.16/example15_16.sce
@@ -0,0 +1,18 @@
+clc
+// Given that
+l = 3e-10 // width of box in m
+e = 1.6e-19 // charge on an electron in C
+m = 9.1e-31 // mass of electron in kg
+c = 3e8 // speed of light in m/sec
+h = 6.62e-34 // Planck constant in J-sec
+// Sample Problem 16 on page no. 15.30
+printf("\n # PROBLEM 16 # \n")
+printf("Standard Formula used \n")
+printf(" E = (n^2 * h^2) / (8 * m * L^2)) \n")
+n = 1 // For n=1
+E = (n^2 * h^2) / (8 * m * l^2)
+n = 2 // For n=2
+E_ = (n^2 * h^2) / (8 * m * l^2)
+n = 3 // For n=3
+E__ = (n^2 * h^2) / (8 * m * l^2)
+printf("\n Energy of electron -\n For (n=1) is %e J.\n For (n=2) is %e J.\n For (n=3) is %e J.",E,E_,E__)