实现多缝衍射的matlab代码
n=3;
a=-4*pi:0.01*pi:4*pi;
P=1-sin(n*a).^2./sin(a).^2;
plot(a,P)
lgray=zeros(256,3);
for i=0:255
lgray(i+1,:)=(255-i)/255;
end
imagesc(P)
colormap(lgray)
matlab GUI程序全部代码
function varargout = duofengyanshe(varargin)
% DUOFENGYANSHE M-file for duofengyanshe.fig
% DUOFENGYANSHE, by itself, creates a new DUOFENGYANSHE or raises the existing
% singleton*.
%
% H = DUOFENGYANSHE returns the handle to a new DUOFENGYANSHE or the handle to
% the existing singleton*.
%
% DUOFENGYANSHE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in DUOFENGYANSHE.M with the given input arguments.
%
% DUOFENGYANSHE('Property','Value',...) creates a new DUOFENGYANSHE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before duofengyanshe_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to duofengyanshe_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help duofengyanshe
% Last Modified by GUIDE v2.5 15-Oct-2012 21:17:58
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @duofengyanshe_OpeningFcn, ...
'gui_OutputFcn', @duofengyanshe_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before duofengyanshe is made visible.
function duofengyanshe_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to duofengyanshe (see VARARGIN)
% Choose default command line output for duofengyanshe
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
set(gcf,'visible','on')
h = actxserver('WScript.Shell');
figure(gcf);
h.SendKeys('% '); %this is shortcut key ALT + {SPACE}
h.SendKeys('{DOWN 4}');
h.SendKeys('~'); %This is enter
set(gcf,'name','多缝衍射');
set(handles.edit1,'string','4')
% UIWAIT makes duofengyanshe wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are
5、多缝的夫琅和费衍射,使用扩展光源照明,前后、上下移动光源,观察衍射 图样的变化 使用扩展光源照明,即为 4 中点光源的光照的叠加。程序代码为: clear Lambda=...
matlab衍射程序_计算机软件及应用_IT/计算机_专业资料。几个matlab编写的光的衍射...多缝衍射 clear lamda=500e-9; %波长 N=2; %缝数,可以随意更改变换 a=...
根据衍射的基本理论,利用Matlab软件的计算功能和绘图函数,研究了单缝衍射和多缝衍射的光强分布曲线及衍射图样,分析了各参数衍射结果的影响.根据衍射的基本理论,利用Ma...
2、用 MATLAB 仿真平行光束的衍射强度分布图样。 (夫朗和费矩形孔 衍射、夫朗和费圆孔衍射、夫朗和费单缝和多缝衍射。 ) 理论推导部分 2.(1)夫朗和费矩形孔衍射 若...
基于MATLAB 双缝干涉和双缝衍射的对比研究 摘要:本文运用 Matlab 软件,参照前人编出的程序,对双缝干涉和双缝衍 射的光强分布和谱线特征进行了数值模拟,绘出实验...
多篇,因此,对于师范类的教师学习 matlab, 尤其是...缝衍射的衍射条纹图样和双缝 干涉图像,并对图像进行...matlab 对程序语法的语法限制相对 c 而言不是非常...
基于MATLAB的光孔衍射数值计算_信息与通信_工程科技_专业资料。编写了夫朗禾费矩形孔、圆孔、椭圆孔、单缝、多缝衍射的MATLAB仿真程序,对这些衍射现象进行了模拟。...
从光的衍射理论出发, 论述了借助计 算机和可视化程序设计 语言仿真 实现夫琅禾...文中 采用将高性能数值计算 和可视化集成于 一体的 MATLAB , 仿真实现了多缝夫...
关键词:夫琅禾费衍射计算机仿真多缝(光栅)MATLAB 该付费资源由维普网提供 中国...从光的衍射理论出发,论述了借助计算机和可视化程序设计语言仿真实现夫琅禾费衍射...
(B,xs); 单缝衍射光强分布图 多缝衍射 Matlab 仿真代码 clear lam=500e-9...3 月份开始为仿真做准备,进行资料调研,开始编写程 序,调试程序 4 月份运行已经...
热门文档