summaryrefslogtreecommitdiff
path: root/3875/CH5/EX5.3/Ex5_3.sce
blob: 4d70d0838caaf7c228f1ca1b6ddd868a5594a91f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
clc;
clear;
lambda=5890*10^-8 //wavelength in cm
k=2
d_lambda=(5896 - 5890)*10^-8 //grating width in cm
d=2.5 //grating width in cm

//calculation
N=lambda/(k*d_lambda) //No. of grating lines 
No_of_lines = N/d

printf("No. of lines per cm = %1.1f",No_of_lines) // The answers vary due to round off error