📄 diffractiongratingspectrum.m
字号:
% Self-running demonstration of a diffraction grating spectrum% by addition of sinewaves from the superimposition of % reflections from multiple grooves, with phase shift due to incremental % path length difference between waves from the adjacent grooves.% Shows build-up of resultant diffraction pattern as superimposed waves % are added. Note: For a clearer presentation, drag the figure1 % and figure2 windows so they do not overlap. % Tom O'Haver, toh@umd.edu, March 2006clear% N = Number of grooves in grating (Try 2 to 30): N=10;% Suggestion: start out with N=2; the "spectrum" is just a sine % wave in that case, the ultimate in low resolution!). Then try N=3, 4,% 5... what happens as N increases. Real gratings have N = 1000'sformat compactclfhold offstart=cputime;x=[0:.1:pi]; % x-axis for one cycle of sine wave (wavelength=2
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -