summaryrefslogtreecommitdiff
path: root/3768/CH4/EX4.2/Ex4_2.sce
blob: 5350703d7f5eb735515b6a2a3cc5d9d82483bf1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Example number 4.2, Page number 66

clc;clear;
close;

//Variable declaration
d=3.04*10**-10;    //lattice spacing(m)
n=3;   //order
lamda=0.79*10**-10;    //wavelength(m)
//Calculation
theta=asin(n*lamda/(2*d));     //glancing angle(radian)
theta=theta*180/%pi;          //glancing angle(degrees)
//Result
printf("glancing angle is %.3f degree",theta)