summaryrefslogtreecommitdiff
path: root/3753/CH1/EX1.3/Ex1_3.sce
blob: 1849c6cd55282805f2be3484b95a84daa1535dfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Example number 1.3, Page number 1.36

clc;clear;close


//Variable declaration
w=0.02   // in m   
n=1
lamda=6.56*10**-7 // in m
theta=(18+(14/60))*%pi/180 // in radian

//Calculation
N=(w*sin(theta))/(n*lamda) // no. of lines

//Result
printf("Total number of lines n the grating=%d",round(N))
//Answer varies due to rounding of number"