summaryrefslogtreecommitdiff
path: root/3828/CH2/EX2.10/Ex2_10.sce
blob: 1ea01bf742559703c21934180c664f88cf9f44be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

//Chapter 2 : Diffraction

clear;

//Variable declaration
lamda=6.5*10**-7         //wavelength
n=1                      //first order
theta=(15*%pi/180)   //angle in radians

//Calculations
d=(n*lamda)/sin(theta)/10**-6

//Result
mprintf("Grating element= %.3f*10**-6 m",d)