summaryrefslogtreecommitdiff
path: root/3834/CH13/EX13.2.1/Ex13_2_1.sce
blob: f18d08b292819042eabbec78088450339d06d46c (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
//Fiber Optics Communication Technology, by Djafer K. Mynbaev and Lovell L.scheiner
//Windows 8
//Scilab version- 6.0.0
//Example 13.2.1
clc;
clear ;
//given

//case 1
lambda1=1540.56E-9;//wavelength in m
lambda2=1541.35E-9;//wavelength in m
d=5E-6;//grating pitch in m

x=lambda1/d;
theta1=asind(x);////Angle of separation in deg
y=lambda2/d;
theta2=asind(y);//Angle of separation in deg

Asep=theta2-theta1;//Angle of separation in deg
mprintf("Angle of separation = %.3f deg.",Asep);

//case 2

z=tand(theta2)-tand(theta1);
L=245E-6/z;//Length required to separate wavelength in m

mprintf("\nLength required to separate wavelength = %.3f m",L);//the answer vary due to rounding