diffractiongratingspectrum.m

来自「the geometry of a diffraction grating, a」· M 代码 · 共 19 行

M
19
字号
% 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 + =
减小字号Ctrl + -
显示快捷键?