function varargout = ModeSolverGUI(varargin)
% MODESOLVERGUI MATLAB code for ModeSolverGUI.fig
% MODESOLVERGUI, by itself, creates a new MODESOLVERGUI or raises the existing
% singleton*.
%
% H = MODESOLVERGUI returns the handle to a new MODESOLVERGUI or the handle to
% the existing singleton*.
%
% MODESOLVERGUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MODESOLVERGUI.M with the given input arguments.
%
% MODESOLVERGUI('Property','Value',...) creates a new MODESOLVERGUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ModeSolverGUI_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ModeSolverGUI_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 ModeSolverGUI
% Last Modified by GUIDE v2.5 12-Jan-2015 11:47:01
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ModeSolverGUI_OpeningFcn, ...
'gui_OutputFcn', @ModeSolverGUI_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 ModeSolverGUI is made visible.
function ModeSolverGUI_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 ModeSolverGUI (see VARARGIN)
set(handles.n_core,'string',1.46);
set(handles.n_clad,'string',1.455060136214308);
set(handles.n_air,'string',1);
set(handles.r_core,'string',4.1);
set(handles.r_clad,'string',62.5);
set(handles.r_air,'string',70);
set(handles.N1,'string',40);
set(handles.N2,'string',200);
set(handles.N3,'string',40);
set(handles.lambda,'string',1.55);
set(handles.Tolerance,'string',1e-4);
% Choose default command line output for ModeSolverGUI
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes ModeSolverGUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = ModeSolverGUI_OutputFcn(~, 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 boundary_Callback(hObject, eventdata, handles)
% hObject handle to boundary (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns boundary contents as cell array
% contents{get(hObject,'Value')} returns selected item from boundary
% --- Executes during object creation, after setting all properties.
function boundary_CreateFcn(hObject, eventdata, handles)
% hObject handle to boundary (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu 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 selection change in Field.
function Field_Callback(hObject, eventdata, ~)
% hObject handle to Field (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns Field contents as cell array
% contents{get(hObject,'Value')} returns selected item from Field
% --- Executes during object creation, after setting all properties.
function Field_CreateFcn(hObject, eventdata, handles)
% hObject handle to Field (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu 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
function lambda_Callback(hObject, eventdata, handles)
% hObject handle to lambda (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 lambda as text
% str2double(get(hObject,'String')) returns contents of lambda as a double
% --- Executes during object creation, after setting all properties.
function lambda_CreateFcn(hObject, eventdata, handles)
% hObject handle to lambda (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
function Tolerance_Callback(hObject, eventdata, handles)
% hObject handle to Tolerance (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Tolerance=str2double(get(hObject,'String'));
% Hints: get(hObject,'String') returns contents of Tolerance as text
% str2double(get(hObject,'String')) returns contents of Tolerance as a double
% --- Executes during object creation, after setting all properties.
function Tolerance_CreateFcn(hObject, eventdata, handles)
% hObject handle to Tolerance (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
function n_core_Callback(hObject, eventdata, handles)
% hObject handle to n_core (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 n_core as text
% str2double(get(hObject,'String')) returns contents of n_core as a double
% --- Executes during object creation, after setting all properties.
function n_core_CreateFcn(hObject, eventdata, handles)
% hObject handle to n_core (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,'defaultUicontrolB
没有合适的资源?快使用搜索试试~ 我知道了~
【光学】基于Matlab实现光波导模式求解器.zip
共10个文件
png:4个
m:4个
xlsx:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 162 浏览量
2023-01-17
15:31:37
上传
评论
收藏 8.21MB ZIP 举报
温馨提示
【光学】基于Matlab实现光波导模式求解器.zip
资源推荐
资源详情
资源评论
收起资源包目录
【光学】基于Matlab实现光波导模式求解器.zip (10个子文件)
fiber.m 2KB
5.PNG 133KB
3.png 12KB
SVMODES.m 14KB
ModeSolverGUI.m 22KB
solvethemode_fiber.m 2KB
ModeSolverGUI.fig 8.37MB
4.png 3KB
Fiber Mode vs different radius.xlsx 18KB
2.png 9KB
共 10 条
- 1
资源评论
天天Matlab科研工作室
- 粉丝: 2w+
- 资源: 7251
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功