简单模拟两个单色光发生相长干涉的情况:
clear,close all
x = 0:0.01:10*pi;
wave1 = sin(x);
wave2 = sin(x);
subplot(3,1,1)
plot(x,wave1)
axis([0 10*pi -2 2])
xlabel('x')
ylabel('wave1')
subplot(3,1,2)
plot(x,wave2)
axis([0 10*pi -2 2])
xlabel('x')
ylabel('wave2')
subplot(3,1,3)
plot(x,wave1+wave2)
axis([0 10*pi -2 2])
xlabel('x')
ylabel('wave1+wave2')
结果如图:
相长干涉,峰值相加,相位不变。
如果想要实现两列波相消,只需要将相位移动pi
clear,close all
x = 0:0.01:10*pi;
wave1 = sin(x);
wave2 = sin(x+pi);
subplot(3,1,1)
plot(x,wave1)
axis([0 10*pi -2 2])
xlabel('x')
ylabel('wave1')
subplot(3,1,2)
plot(x,wave2)
axis([0 10*pi -2 2])
xlabel('x')
ylabel('wave2')
subplot(3,1,3)
plot(x,wave1+wave2)
axis([0 10*pi -2 2])
xlabel('x')
ylabel('wave1+wave2')
结果:
来源《高等光学仿真——光波导、激光》