summaryrefslogtreecommitdiff
path: root/3537/CH4/EX4.16/Ex4_16.sce
diff options
context:
space:
mode:
Diffstat (limited to '3537/CH4/EX4.16/Ex4_16.sce')
-rw-r--r--3537/CH4/EX4.16/Ex4_16.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/3537/CH4/EX4.16/Ex4_16.sce b/3537/CH4/EX4.16/Ex4_16.sce
new file mode 100644
index 000000000..f755680f9
--- /dev/null
+++ b/3537/CH4/EX4.16/Ex4_16.sce
@@ -0,0 +1,21 @@
+//Example 4_16
+clc();
+clear;
+//To find the wavelength and energy of X-ray beam
+theta=27.5 //units in degrees
+n=1
+h=1
+k=1
+l=1
+H=6.625*10^-34 //planks constant
+c=3*10^10 //velocity of light units in meters
+a=5.63*10^-10 //units in meters
+lemda=(2*(a/sqrt(h^2+k^2+l^2))*sin(theta*%pi/180))/n*10^10
+printf("The wavelength of X-Ray beam is %.0f angstrom",lemda)
+lemda=lemda*10^-10 //units in cm
+E=(H*c)/lemda
+E=E*10^20 //units in Joules
+E=E/(1.6*10^-19)
+printf("\n\nThe energy of X-ray beam is ")
+disp(E)
+printf("eV")