【光学】基于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)一束光传播至 ...
最新文章
- 个人知识管理的10个误区
- 为什么我不建议你用阿里巴巴Java规范,而使用 Google Guava 编程?
- R语言ggplot2可视化时间序列数据并突出标注重要时间点数据实战:特殊节点标签标注、特殊区域标注
- 为什么用户体验设计师需要像建筑师一样思考?
- P1525 关押罪犯
- mysqli num php_php mysqli_num_rows函数怎么用
- github上传自己的项目
- 10月10日见!官方再曝OPPO K5外观配置细节:6400万超清四摄加持
- 本地函数定义是非法的_使用函数计算三步实现深度学习 AI 推理在线服务
- 阶段5 3.微服务项目【学成在线】_day04 页面静态化_11-freemarker静态化测试-基于模板字符串静态化...
- 组策略禁止自动锁定计算机,让Win10自动锁屏的设置技巧
- 挖掘数百万参与的IMVU用户
- 【算法】3 由招聘问题看随机算法
- IE8——focus函数不好用
- DNS 区域传送漏洞(dns-zone-tranfer)学习
- Multipathd Daemon was Unable to Set Options fast_io_fail_tmo or dev_loss_tmo Under UEK1 or RHCK
- session是什么 PHP使用session
- c#代码转python代码工具_Python至C#代码转换
- 百度云下载转化为迅雷下载的解决办法
- 如何绕过校园网验证,在宿舍免费上办公区的网,享受不拥挤的网络
热门文章
- PS 如何使用钢笔工具
- awr报告与statspack报告
- Mysql Alter table 操作
- unity 相机(物体)自动前移,单击屏幕后退
- Atitit pwa app prblm sulo目录1.1.1. 安卓的chrome没有弹添加到桌面的弹窗 11.1.2. 如何判断是否从主屏幕访问 11.1.3. 如何监听添加到桌面事
- Atitit poi读取大文件内存溢出的解决 目录 1. poi提供了两种读取excel的方式,一种是类似xml的Dom,	1 2. POI官网上提到XSSF有三种读写excel,POI地址	1 3
- Atitit.软件开发的几大规则,法则,与原则Principle v5 1.1. 修改历史	2 2. 设计模式六大原则	3 2.1. 设计模式六大原则(1):单一职责原则	3 2.2. 设计模式六
- Atitit 院系和专业规划 大学里的院系,院一般指的都是学院,比如管理学院、法学院这种,系指的就是院里面的专业,比如中文系、哲学系这种。 中文系、哲学系 土木工程 目录 1. 经济管理学院	2
- Atitit java 原生 客户端 native desktop桌面 javafx 浏览器环境 导入jar jfxrt.jar 17M package com.attilax.ui;
- Atitit 迭代法 “二分法”和“牛顿迭代法 attilax总结