【光学】基于matlab GUI迈克尔逊实验仿真【含Matlab源码 060期】
一、获取代码方式
获取代码方式1:
完整代码已上传我的资源:【光学】基于matlab GUI迈克尔逊实验仿真【含Matlab源码 060期】
获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。
备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);
二、部分源代码
function varargout = michelson_GUI(varargin)
% MICHELSON_GUI MATLAB code for michelson_GUI.fig
% MICHELSON_GUI, by itself, creates a new MICHELSON_GUI or raises the existing
% singleton*.
%
% H = MICHELSON_GUI returns the handle to a new MICHELSON_GUI or the handle to
% the existing singleton*.
%
% MICHELSON_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MICHELSON_GUI.M with the given input arguments.
%
% MICHELSON_GUI('Property','Value',...) creates a new MICHELSON_GUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before michelson_GUI_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to michelson_GUI_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 michelson_GUI% L % Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...'gui_Singleton', gui_Singleton, ...'gui_OpeningFcn', @michelson_GUI_OpeningFcn, ...'gui_OutputFcn', @michelson_GUI_OutputFcn, ...'gui_LayoutFcn', [] , ...'gui_Callback', []);
if nargin && ischar(varargin{1})gui_State.gui_Callback = str2func(varargin{1});
endif nargout[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
elsegui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT% --- Executes just before michelson_GUI is made visible.
function michelson_GUI_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 michelson_GUI (see VARARGIN)% Choose default command line output for michelson_GUI
handles.output = hObject;% Update handles structure
guidata(hObject, handles);% UIWAIT makes michelson_GUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.
function varargout = michelson_GUI_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)% Get default command line output from handles structure
varargout{1} = handles.output;function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
global lambda;
lambda = str2double(get(hObject, 'String'))*10^(-9);% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');
endfunction edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit2 as text
% str2double(get(hObject,'String')) returns contents of edit2 as a double
global l;
l = str2double(get(hObject, 'String'));% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');
endfunction edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit3 as text
% str2double(get(hObject,'String')) returns contents of edit3 as a double
global D;
D = str2double(get(hObject, 'String'))*10^(-3);% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');
end% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
intensity0 = 1;
global D;
global l;
global lambda;
global beta;global x;
global y;
global r;xv = -0.1:0.001:0.1;
yv = -0.1:0.001:0.1;
[x, y] = meshgrid(xv, yv);
r = sqrt(x.^2 + y.^2);
beta = 0;d2 = 0.5;
d1 = (d2-D)*cos(beta);
d = d2-d1*cos(beta);path1 = sqrt(x.^2 + y.^2+l^2);
path2 = sqrt((x-2*d1*sin(beta)).^2 + y.^2 + (l-2*d)^2);
opticalPath = abs(path1-path2);
sigma = 2 * pi() * opticalPath / lambda;
intensity = 4 * intensity0 * (cos(sigma / 2)).^2;fig = surf(handles.axes3, x, y, intensity);
set(fig, 'edgecolor', 'none');
view(2);
caxis([0,4]);
colormap(gray);% --- Executes during object creation, after setting all properties.
function axes3_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called% Hint: place code in OpeningFcn to populate axes3% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
intensity0 = 1;
三、运行结果
四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1] 门云阁.MATLAB物理计算与可视化[M].清华大学出版社,2013.
【光学】基于matlab GUI迈克尔逊实验仿真【含Matlab源码 060期】相关推荐
- 【光学】基于matlab GUI维达尔之眼计算【含Matlab源码 2545期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI维达尔之眼计算[含Matlab源码 2545期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: ...
- 【光学】基于matlab GUI双孔干涉【含Matlab源码 2119期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI双孔干涉[含Matlab源码 2119期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: 付费 ...
- 【光学】基于matlab GUI双缝干涉和牛顿环【含Matlab源码 2165期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI双缝干涉和牛顿环[含Matlab源码 2165期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2 ...
- 【运动学】基于matlab GUI三体运动模拟【含Matlab源码 871期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[运动学]基于matlab GUI三体运动模拟[含Matlab源码 871期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: ...
- 【音乐播放】基于matlab GUI动感音乐播放【含Matlab源码 778期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[音乐播放]基于matlab GUI动感音乐播放[含Matlab源码 778期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: ...
- 【雷达通信】基于matlab GUI相控阵雷达方向图【含Matlab源码 1048期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[雷达通信]基于matlab GUI相控阵雷达方向图[含Matlab源码 1048期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方 ...
- 【数据分析】基于matlab GUI齿轮箱振动数据分析【含Matlab源码 2122期】
一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[数据分析]基于matlab GUI齿轮箱振动数据分析[含Matlab源码 2122期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方 ...
- 【数字信号】基于matlab GUI电话按键识别【含Matlab源码 2382期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[数字信号]基于matlab GUI电话按键识别[含Matlab源码 2382期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2 ...
- Matlab GUI/APP 浅谈(附计算器源码)
Matlab GUI/APP 浅谈(附计算器源码) 今天没有什么段子,也没有心灵鸡汤.毒鸡汤啥的,纯粹聊一聊这些年从有关MATLAB GUI/APP开发中悟出的一点道理,顺便把计算器的源代码给大家. ...
- 基于Matlab的迈克尔逊干涉仪仿真模拟
一.原理 迈克尔逊干涉仪结构示意图如下: 图1 迈克尔逊干涉仪结构示意图 二.仿真结果 仿真参数如下: 1)模拟光束传播至透镜(焦距为40cm) 2)传播至分束镜,分光比设置为50% 3)一束光传播至 ...
最新文章
- benchmarksql测试mysql_数据库压力测试工具 -- BenchmarkSQL 使用说明
- JavaEE互联网轻量级框架整合开发(书籍)阅读笔记(1):Mybatis和Hibernate概念理解...
- Mac 建PHP 环境 及 配置 apache 默认目录
- 包含实时功能的ASP.NET系统结构
- 《深入理解 Java 内存模型》读书笔记(上)(干货,万字长文)
- 一个关于Angular Directive selector里的中括号使用问题
- html native code is rendered from xml configuration
- 震撼!波士顿动力最新逆天机器人视频,倒立翻筋斗!人类集体沉默...
- Android style 继承
- AUTOSAR从入门到精通100讲(十三)--autosar架构中的ARXML
- JAVA多线程实现的三种方式 ()
- MVC4发布到IIS7报404错误
- c#中using 和new
- 如何用css实现类似简书的纵向导航/竖排导航
- Python入门经典(2K超清)
- vivo浏览器缓存视频如何拷贝到电脑上
- CSS:两种方式画一个梯形
- 读《期货市场计算机分析指南》笔记
- 论文阅读【A multi-task attention tree neural net for stance classification and rumor veracity detection】
- 信息安全密码学实验四:Diffie-Hellman密钥交换协议的设计与实现
热门文章
- MVC采用Jquery实现局部刷新
- html5 sessionStorage 与 localStorage存储
- Oracle禁止connect / as sysdba方式登录
- jQuery Gantt Package控件发布v3.0版本
- WinEdt编译重新生成PDF以及找到模板tex对应的论文树形结构
- AR标记时虚实融合投影仪和相机的手动标定
- Atitit 如何设置与安放知识的trap陷阱 知识聚合 rss url聚合工具 以及与trap的对比
- paip.VOB DVD视频的无损分割与截取
- paip.c#图片裁剪
- paip.svn服务服务器安装配置