概述
满意答案
lucykuaile
2013.12.31
采纳率:49% 等级:12
已帮助:5657人
% 杨氏干涉的模拟
close all
figure('position',[217 266 694 244]);
% Author's email:zjliu2001@163.com
set(gcf,'DoubleBuffer','on');
axes('position',[0.12,0.08,0.6,0.8]);hold on;
rectangle('position',[-1,1.1,0.1,3],'FaceColor',[0.1,0.3,0.4]);
rectangle('position',[-1,-4,0.1,3],'FaceColor',[0.1,0.3,0.4]);
rectangle('position',[-1,-0.8,0.1,1.6],'FaceColor',[0.1,0.3,0.4]);
axis([-4,12,-5,5]);
ha=plot([-3.8,-3.8],[0.9,0.9],'r','linewidth',3);
hb=plot([-3.8,-3.8],[-0.9,-0.9],'r','linewidth',3);
title('Double slit interference copyright zjliu')
L=-3.8;
rectangle('position',[11,-4,0.1,8],'FaceColor',[0,0,0]);
plot([-1,4.1],[-3.5,-3.5],'k');
plot([5.9,11],[-3.5,-3.5],'k');
plot([-0.7,-1,-0.7],[-3.3,-3.5,-3.7],'k');
plot([10.7,11,10.7],[-3.3,-3.5,-3.7],'k');
text(4.8,-3.5,'3m');
plot([-1.5,-1.5],[0.9,0.35],'k');
plot([-1.5,-1.5],[-0.9,-0.35],'k');
plot([-1.65,-1.5,-1.3],[0.6,0.9,0.6],'k');
plot([-1.6,-1.5,-1.3],-[0.6,0.9,0.6],'k');
text(-2.1,0,'2mm');
while L<=-0.95;
L=L+0.05;
set(ha,'xdata',[-3.8,L]);
set(hb,'xdata',[-3.8,L]);
pause(0.05);
end
xas=-0.95;yas=0.9;
xbs=-0.95;ybs=-0.9;
po=[-3.5:3.5];
ka=(po-yas)*i+(11+0.95);ka=ka./abs(ka);
kb=(po-ybs)*i+(11+0.95);kb=kb./abs(kb);
for n=1:8;
ah(n)=plot(xas,yas,'r');
bh(n)=plot(xbs,ybs,'r');
end
r=0;
za=xas+yas*i;zb=xbs+ybs*i;
Le=sqrt(11.95^2+3.5^2);
while r<=Le;
for n=1:8;
Ta=za+r*ka(n);
Ya=imag(Ta);
if abs(imag(Ta))>=abs(po(n));
Ya=po(n);
end
set(ah(n),'xdata',[xas,min(11,real(Ta))],'ydata',[yas,Ya]);
Tb=zb+r*kb(n);
Yb=imag(Tb);
if abs(imag(Tb))>=abs(po(n));
Yb=po(n);
end
set(bh(n),'xdata',[xbs,min(11,real(Tb))],'ydata',[ybs,Yb]);
end
r=r+0.05;
pause(0.05);
end
s=meshgrid(linspace(4,-4,300))';
De=abs((s-1)*i+3000)-abs((s+1)*i+3000);
lambda=0.6328e-3;
de_A=De/lambda*pi*2;
It=1-cos(de_A);
axes('position',[0.72,0.16,0.26,0.64]);
cc=cat(3,It/2,zeros(size(It)),zeros(size(It)));
imshow(cc,[]);
xlabel('copyright zjliu')
02分享举报
最后
以上就是活力纸鹤为你收集整理的matlab 事件 流程图,高手帮忙一下,画下面matlab程序的流程图:的全部内容,希望文章能够帮你解决matlab 事件 流程图,高手帮忙一下,画下面matlab程序的流程图:所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复