summaryrefslogtreecommitdiff
path: root/1985/CH11/EX11.6/Chapter11_Example6.sce
blob: 45b8fa949f4134139db9e5aa4e63a17d6fbbe0a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
//Input data
q=60//Angle of scattering in degrees
l=1.24//Wavelength of X-rays in angstroms
m=9.1*10^-31//Mass of the electron in kg
h=6.625*10^-34//Plancks constant in J.s
c=(3*10^8)//Velocity of light in m/s

//Calculations
dl=((h*(1-cosd(q)))/(m*c))/10^-10//The Compton angle in degrees

//Output
printf('The Compton shift is %3.3f angstroms',dl)