bwzong的个人博客分享 http://blog.sciencenet.cn/u/bwzong

博文

单缝衍射,多缝衍射

已有 7598 次阅读 2014-12-28 20:20 |个人分类:成长日记.matlab|系统分类:教学心得

NO1.单缝衍射

%单缝衍射仿真

%光学,P244,(4,34)

clear all;clc,

close all;

lambda=659e-9;%波长

z=0.08;%距离z=0.080m

a=1e-4;% 狭缝

x=linspace(-0.002,0.002,1000);

for i=1:1000

   u=(pi*a/lambda)*(x(i)/sqrt(x(i)^2+z^2));

   I(i)=(sin(u)/u)^2;

end

NClevels=255;

Ir=NClevels*I;

colormap(gray);

subplot(2,1,1),image(x,I,Ir);

title('单缝衍射');

subplot(2,1,2),plot(x,I(:)/max(I));

title('单缝衍射');


NO2.多缝衍射

%多缝衍射

%P262,(4.5.5)

clear all,clc

%close all

lambda=650e-9;%波长;光栅缝数N=8;光栅常量d=2e-5;透光缝宽a=6e-6

z=0.1;%距离

a=6e-6;d=2e-5;N=8;%最大坐标x=12mm

x=linspace(-0.012,0.012,1000);

for i=1:1000

   u=(pi*a/lambda)*(x(i)/sqrt(x(i)^2+z^2));

   I(i)=(sin(u)/u)^2*(sin(d*u*N/a)/sin(d*u/a))^2;

end

NClevels=255;

Ir=NClevels*I;

figure

colormap(gray(256));

subplot(2,1,1),image(x,I,Ir);

title('多缝衍射N=8');

subplot(2,1,2),plot(x,I(:)/max(I));

title('多缝衍射强度');


   


   




https://blog.sciencenet.cn/blog-1120694-854580.html

上一篇:傅立叶变换与GS算法初步
下一篇:基模高斯光
收藏 IP: 202.118.244.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-11-23 15:32

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部