blob: 930d51740dd6adb9762aa8640a0cf4e852126952 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
clear
//
//
//
//Variable declaration
n=1 //order
theta=38.2*%pi/180 //glancing angle(radian)
lamda=1.54 //wavelength(angstrom)
h=2
k=2
l=0
//Calculation
a=sqrt(h**2+k**2+l**2)
d=n*lamda*a/(2*sin(theta)) //lattice parameter(angstrom)
//Result
|