summaryrefslogtreecommitdiff
path: root/3875/CH5/EX5.8/Ex5_8.sce
blob: 66836c9ef6e09207bb75b10e9b089b65485a0bd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
clc;
clear;
theta=10 //angle in degree
d_theta=3 //angle in degree
d_lambda=5*10^-9 //wavelength in cm
k=2

//calculation 
lambda=(sind(theta)*d_lambda)/(cosd(theta)*(d_theta/(60*60))*(%pi/180)) // wavelength in cm
N=lambda/(d_lambda*k) //number of lines
Ne = (N*k*lambda)/sind(theta)

printf("Minimum grating width required = %1.1f cm",Ne)