summaryrefslogtreecommitdiff
path: root/3537/CH5/EX5.11/Ex5_11.sce
blob: 7efbb2207f422b4d71b67e53974b732c2164f924 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//Example 5_11
clc();
clear;
//To find the wavenength and energy
n=4
a=107.87    //units in amu
N=10500
row=6.052*10^26
a=((n*a)/(N*row))^(1/3)*10^10  //units in A
h=1
k=1
l=1
d=a/sqrt(h^2+k^2+l^2)   //units in A
theta=19.      //units in degrees
lamda=2*d*sin(theta*%pi/180)     //units in A
printf("Wavelength is lamda=%.2fA",lamda)
lamda=lamda*10^-10   //units in meters

h=6.625*10^-34  //Plancks constant
c=3*10^8      //units in meter/sec
energy=(h*c)/(lamda*1.6*10^-19)   //units in eV
printf("\n energy is =%d eV",energy)