summaryrefslogtreecommitdiff
path: root/2708/CH2/EX2.19/ex_2_19.sce
blob: 017e567a2550ee2005c44c91110ad7ced1ae73d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//Example 2.19 //Angular sepration
clc;
clear;
//given data
n=1;// order of spectrum
wi=.5;// width of grating in cm
N=2500;//total no. of lines 
c=wi/N;//grating element
w1=589D-7;// first wavelength of sodium in cm
//part a
theta1=asin(n*w1/c)//angular width in radian
theta1=theta1*180/%pi;//angular width in degree
disp(theta1,"angular width in degree")
w2=5896D-8;//second wavelength of sodium in cm
//part b
theta2=asin(n*w2/c)//angular width in radian
theta2=theta2*180/%pi;//angular width in degree
disp(theta2,"angular width in degree")
theta=theta2-theta1;//angular sepration degree
disp(theta,"angular sepration in degree")
w=(w1+w2)/2;//mid wavelength
dw=6D-8;// change of wavelength in cm
n=1;//order of spectrum
N=w/(n*dw);//no. of lines will appear
N=floor(N);// N should be integer
if(1/c>N)
    disp(N,"No. of lines will appear")
else
    disp("they can not be seen differently ")
end