blob: 5062ea32417ff4768d54560b25caa18cf6a67b95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
clc
clear
//Input data
N=5000//Number of lines drawn on the grating per m
w=(5890*10^-10)//Wavelength of the light used in m
//Calculations
n=(1/(w*N*100))//Order of spectrum
x=ceil(n)//Rounding off to next integer
//Output
printf('Since n < %i, it is not possible to observe the fourth or higher order of diffraction',x)
|