blob: 3d3a88d05b0eea6e6fb82a2e3140d6f8b3f2e1de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Example 4_13
clc();
clear;
//To calculate the glancing angle for the second order diffraction
lemda=0.071*10^-9 //units in meters
a=0.28*10^-9 //units in meters
h=1
k=1
l=0
n=2
theta=(asin((n*lemda)/(2*(a/(sqrt(h^2+k^2+l^2))))))*180/%pi
printf("The glancing angle for the second order diffraction is %.2f degrees",theta)
|