?? yangshiganshe.m
字號:
% 總程序
lanmda=632.8e-6;
D=2;
L=1000;
%單色光
x=-20:0.01:20;
I=YoungIF(lanmda,D,L,x);
I=I/max(I);
subplot(2,1,1);
plot(x,I);
subplot(2,1,2);
yy=[0,1];
n=0;
for k=-20:0.01:20
n=n+1
line([k,k],yy,'Color',[I(n),0,0]);
end
%準單色光 5% 矩形
deltaL=lanmda*0.05;
dL=0.01*deltaL;
II=x;
II(:)=0;
for tL=(lanmda-0.5*deltaL):dL:(lanmda+0.5*deltaL)
II=II+YoungIF(tL,D,L,x);
end
II=II/max(II);
figure;
subplot(2,1,1);
plot(x,II);
subplot(2,1,2);
n=0;
for k=-20:0.01:20
n=n+1;
line([k,k],yy,'Color',[II(n),0,0]);
end
%準單色光 10% 矩形
deltaL=lanmda*0.1;
dL=0.01*deltaL;
II=x;
II(:)=0;
for tL=(lanmda-0.5*deltaL):dL:(lanmda+0.5*deltaL)
II=II+YoungIF(tL,D,L,x);
end
II=II/max(II);
figure;
subplot(2,1,1);
plot(x,II);
subplot(2,1,2);
n=0;
for k=-20:0.01:20
n=n+1;
line([k,k],yy,'Color',[II(n),0,0]);
hold on;
end
w=1;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -