blob: 7320730a6ccbbc37c17e3c5a890f27f333e96123 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//Example number 5.5, Page number 86
clc;clear;
close;
//Variable declaration
V=344; //accelerated voltage(V)
n=1;
theta=60; //glancing angle(degrees)
//Calculation
theta=theta*%pi/180; //glancing angle(radian)
lamda=12.27/sqrt(V);
d=n*lamda/(2*sin(theta)); //spacing of crystal(angstrom)
//Result
printf("spacing of crystal is %.4f Angstrom",d)
|