summaryrefslogtreecommitdiff
path: root/3768/CH4/EX4.7/Ex4_7.sce
blob: e675bfe5787260450c65a93111f245cb7a008e15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//Example number 4.7, Page number 68

clc;clear;
close;

//Variable declaration
n=1;   //order
h=1;
k=1;
l=1;
e=1.6*10**-19;    //charge(c)
theta=27.5;    //angle(degree)
H=6.625*10**-34;    //plancks constant
c=3*10**10;    //velocity of light(m)
a=5.63*10**-10;     //lattice constant(m)
//Calculation
theta=theta*%pi/180;    //angle(radian)
d=a/sqrt(h**2+k**2+l**2);
lamda=2*d*sin(theta)/n;      //wavelength of Xray beam(m)
E=H*c/(e*lamda);           //energy of Xray beam(eV)         
//Result
printf("wavelength of X-ray beam is %.f Angstrom",int32(lamda*10**10))
printf("\n energy of Xray beam is %.2e eV",E)
//answer in the book is wrong