summaryrefslogtreecommitdiff
path: root/3768/CH4/EX4.10/Ex4_10.sce
blob: 32e1a87bae1bf411f87dd48fd932d2fc72c9f04c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Example number 4.10, Page number 70

clc;clear;
close;

//Variable declaration
n=1;   //order
h=1;
k=1;
l=1;
e=1.6*10**-19;    //charge(c)
V=5000;    //voltage(V)
m=9.1*10**-31;    //mass(kg)
H=6.625*10**-34;   //plank constant
d=0.204*10**-9;    //interplanar spacing(m)
//Calculation
lamda=H/sqrt(2*m*e*V);    //wavelength(m)
theta=asin(n*lamda/(2*d));    //bragg's angle(radian)
theta=theta*180/%pi;    //bragg's angle(degree)
//Result
printf("bragg''s angle is %.4f degree",theta)