MATLAB Scientific Academy
INTERACTIVE SCIENTIFIC LAB

Change a value.
Discover what changes.

Browser-based teaching models to build intuition. These interactive demonstrations do not execute MATLAB code; lessons include corresponding MATLAB examples.

Optical parameters

Ideal single-slit far-field model.

Wavelength550 nm
400 nm700 nm
Slit width50 µm
20 µm100 µm
Screen distance1.0 m
0.5 m2 m

Normalized intensity profile

Calculated in your browser using I/I₀ = (sin β / β)².

0.000.250.500.751.00-15-10-5051015Screen position (mm)I / I₀
First minimum, each side (approx.)11.00 mm
Central maximum width (approx.)22.00 mm
What to notice
Longer wavelengths and a more distant screen broaden the pattern; wider slits narrow it. Width estimates use the small-angle approximation.
MATLAB equivalentEXAMPLE
lambda = 550e-9; a = 50e-6; L = 1.0;
x = linspace(-0.015, 0.015, 1000);
theta = atan(x/L); beta = pi*a*sin(theta)/lambda;
I = (sin(beta)./beta).^2; % handle beta = 0
plot(x*1e3, I); grid on;
Study the optics lesson