summaryrefslogtreecommitdiff
path: root/1271/CH20/EX20.11/example20_11.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1271/CH20/EX20.11/example20_11.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/CH20/EX20.11/example20_11.sce')
-rwxr-xr-x1271/CH20/EX20.11/example20_11.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/1271/CH20/EX20.11/example20_11.sce b/1271/CH20/EX20.11/example20_11.sce
new file mode 100755
index 000000000..a7aa242a8
--- /dev/null
+++ b/1271/CH20/EX20.11/example20_11.sce
@@ -0,0 +1,15 @@
+clc
+// Given that
+V1 = 44e3 // voltage in first case in V
+V2 = 50e3 // voltage in second case in V
+lambda1 = 0.284e-10 // shortest wavelength in first case in m
+lambda2 = 0.248e-10 // shortest wavelength in second case in m
+e = 1.6e-19 // charge on an electron in C
+c = 3e8 // speed of light in m/sec
+// Sample Problem 11 on page no. 20.10
+printf("\n # PROBLEM 11 # \n")
+printf("Standard formula used \n ")
+printf(" h*c/Lambda = eV \n")
+h1 = e * V1 * lambda1 / c
+h2 = e * V2 * lambda2 / c
+printf("\n Planck constant is %e J sec if shortest wavelength is %e m .\n Planck constant is %e Jsec if shortest wavelength is %e m. ",h1,lambda1,h2,lambda2)