diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2411/CH5/EX5.5/Ex5_5.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2411/CH5/EX5.5/Ex5_5.sce')
-rwxr-xr-x | 2411/CH5/EX5.5/Ex5_5.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/2411/CH5/EX5.5/Ex5_5.sce b/2411/CH5/EX5.5/Ex5_5.sce new file mode 100755 index 000000000..4a69f2541 --- /dev/null +++ b/2411/CH5/EX5.5/Ex5_5.sce @@ -0,0 +1,24 @@ +// Scilab Code Ex5.5: Page-285 (2008)
+clc; clear;
+function [] = check_energy(E, L)
+phi = 4.8; // Work function for tungsten, eV
+ if E > phi then
+ printf("\nThe wavelength %d angstrom will be able to liberate an electron.", ceil(L/1e-010));
+ else
+ printf("\nThe wavelength %d angstrom will not be able to liberate an electron.", ceil(L/1e-010));
+ end
+endfunction
+h = 6.62e-034; // Planck's constant, Js
+c = 3e+008; // Speed of light, m/s
+// Case 1
+lambda = 2000e-010; // Wavelength of incident radiation, m
+E = h*c/(lambda*1.6e-019); // Energy of the incidnt radiation, eV
+check_energy(E, lambda); // Check for the wavelength
+// Case 2
+lambda = 5000e-010; // Wavelength of incident radiation, m
+E = h*c/(lambda*1.6e-019); // Energy of the incidnt radiation, eV
+check_energy(E, lambda); // Check for the wavelength
+
+// Result
+// The wavelength 2000 angstrom will be able to liberate an electron.
+// The wavelength 5000 angstrom will not be able to liberate an electron.
\ No newline at end of file |