summaryrefslogtreecommitdiff
path: root/1871/CH1/EX1.11/Ch01Ex11.sce
diff options
context:
space:
mode:
Diffstat (limited to '1871/CH1/EX1.11/Ch01Ex11.sce')
-rwxr-xr-x1871/CH1/EX1.11/Ch01Ex11.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/1871/CH1/EX1.11/Ch01Ex11.sce b/1871/CH1/EX1.11/Ch01Ex11.sce
new file mode 100755
index 000000000..70559b2f2
--- /dev/null
+++ b/1871/CH1/EX1.11/Ch01Ex11.sce
@@ -0,0 +1,15 @@
+// Scilab code Ex1.11: Pg:36 (2008)
+clc;clear;
+h = 6.62e-034; // Planck's constant, joule-sec
+c = 3e+08; // Velocity of light, m/s
+m = 9.13e-031; // Mass of an electron, kg
+e = 1.6e-019; // Charge of electron, coulomb
+V = 18000; // Potential difference applied between cathode and anode, volts
+E = e*V; // Energy of the electron, joule
+// Since energy of X-rays is equal to energy of the electron thus
+// h*c/Lambda = e*V, solving for Lambda
+Lambda = h*c/E; // Wavelength of X-rays, angstorm
+printf("\nThe shortest wavelength of X-rays in an X-ray tube = %4.2f angstorm", Lambda/1e-010);
+
+// Result
+// The shortest wavelength of X-rays in an X-ray tube = 0.69 angstorm \ No newline at end of file