blob: 44fa0aea4f95317e1d91ff81b86ede487db13cd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
clear
//
//
//
//Variable declaration
d=0.282 //lattice spacing(nm)
theta=(8+(35/60))*%pi/180 //glancing angle(radian)
n=1 //order
//Calculation
lamda=2*d*sin(theta)/n //wavelength(nm)
N=2*d/lamda //maximum order of diffraction
//Result
printf("\n wavelength is %0.3f nm",lamda)
printf("\n maximum order of diffraction is %0.3f ",N)
|