资源描述:
《MATLAB 光学谐振腔的设计》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、A1:光学谐振腔的设计设计任务:有一平面镜和曲率半径为的凹面镜,画出光束发散角与腔长的关系曲线。设计要求:(1)具有友好输入输出界面;(2)可输入不同凹面镜曲率半径值,查看结果变化情况。functionvarargout=A1(varargin)%A1M-fileforA1.fig%A1,byitself,createsanewA1orraisestheexisting%singleton*.%%H=A1returnsthehandletoanewA1orthehandleto%theexistingsingleton*
2、.%%A1('CALLBACK',hObject,eventData,handles,...)callsthelocal%functionnamedCALLBACKinA1.Mwiththegiveninputarguments.%%A1('Property','Value',...)createsanewA1orraisesthe%existingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforeA1_OpeningFun
3、ctiongetscalled.An%unrecognizedpropertynameorinvalidvaluemakespropertyapplication%stop.AllinputsarepassedtoA1_OpeningFcnviavarargin.%%*SeeGUIOptionsonGUIDE'sToolsmenu.Choose"GUIallowsonlyone%instancetorun(singleton)".%%Seealso:GUIDE,GUIDATA,GUIHANDLES%Copyright20
4、02-2003TheMathWorks,Inc.%EdittheabovetexttomodifytheresponsetohelpA1%LastModifiedbyGUIDEv2.521-Oct-201018:17:18%Begininitializationcode-DONOTEDITgui_Singleton=1;gui_State=struct('gui_Name',mfilename,...'gui_Singleton',gui_Singleton,...'gui_OpeningFcn',@A1_Opening
5、Fcn,...'gui_OutputFcn',@A1_OutputFcn,...'gui_LayoutFcn',[],...'gui_Callback',[]);ifnargin&&ischar(varargin{1})gui_State.gui_Callback=str2func(varargin{1});endifnargout[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});elsegui_mainfcn(gui_State,varargin{:})
6、;end%Endinitializationcode-DONOTEDIT%---ExecutesjustbeforeA1ismadevisible.functionA1_OpeningFcn(hObject,eventdata,handles,varargin)%Thisfunctionhasnooutputargs,seeOutputFcn.%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstruct
7、urewithhandlesanduserdata(seeGUIDATA)%varargincommandlineargumentstoA1(seeVARARGIN)%ChoosedefaultcommandlineoutputforA1handles.output=hObject;%Updatehandlesstructureguidata(hObject,handles);%UIWAITmakesA1waitforuserresponse(seeUIRESUME)%uiwait(handles.figure1);%-
8、--Outputsfromthisfunctionarereturnedtothecommandline.functionvarargout=A1_OutputFcn(hObject,eventdata,handles)%varargoutcellarrayforreturningoutputargs(seeVARA