summaryrefslogtreecommitdiff
path: root/1847/CH3/EX3.9/Ch03Ex9.sce
blob: 308349a5b58d10518b7b490421bc79a89fbdb121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Scilab Code Ex3.9:: Page-3.24 (2009)
clc; clear;
lambda = 6600e-008;     // Wavelength of light used, cm
a = 0.018;    // Width of the slit, cm
f = 200;        // Focal length of the lens, cm
n = 1;      // Order for first order diffraction
// As a*sin(theta) = n*lambda, a*theta = n*lambda
// As theta = lambda/a and theta = x/f, solving for x
x = lambda*f/a;     // Half angular width at central maximum, cm

printf("\nThe width of central maximum = %3.1f cm", 2*x);

// Result 
// The width of central maximum = 1.5 cm