免费预览已结束,剩余1页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
A1:光学谐振腔的设计设计任务:有一平面镜和曲率半径为的凹面镜,画出光束发散角与腔长的关系曲线。设计要求:(1)具有友好输入输出界面;(2)可输入不同凹面镜曲率半径值,查看结果变化情况。function varargout = A1(varargin)% A1 M-file for A1.fig% A1, by itself, creates a new A1 or raises the existing% singleton*.% H = A1 returns the handle to a new A1 or the handle to% the existing singleton*.% A1(CALLBACK,hObject,eventData,handles,.) calls the local% function named CALLBACK in A1.M with the given input arguments.% A1(Property,Value,.) creates a new A1 or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before A1_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to A1_OpeningFcn via varargin.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES% Copyright 2002-2003 The MathWorks, Inc.% Edit the above text to modify the response to help A1% Last Modified by GUIDE v2.5 21-Oct-2010 18:17:18% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, A1_OpeningFcn, . gui_OutputFcn, A1_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);endif nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT% - Executes just before A1 is made visible.function A1_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 A1 (see VARARGIN)% Choose default command line output for A1handles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes A1 wait for user response (see UIRESUME)% uiwait(handles.figure1);% - Outputs from this function are returned to the command line.function varargout = A1_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 structurevarargout1 = handles.output;% - 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)handles.R=str2double(get(handles.editR,string);handles.B=str2double(get(handles.editB,string);guidata(hObject,handles);L=0.1*101:0.1:102;f=sqrt(L*handles.R*102-L.2);w=sqrt(handles.B*10(-4)*f/pi);jiao=2*handles.B*10(-4)/pi./w;plot(L,jiao);grid on;xlabel(腔长l(cm);ylabel(散射角(rad); title(光束发散角与腔长的关系曲线);function editR_Callback(hObject, eventdata, handles)% hObject handle to editR (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 editR as text% str2double(get(hObject,String) returns contents of editR as a double% - Executes during object creation, after setting all properties.function editR_CreateFcn(hObject, eventdata, handles)% hObject handle to editR (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 set(hObject,BackgroundColor,white);else set(hObject,BackgroundColor,get(0,defaultUicontrolBackgroundColor);endfunction editB_Callback(hObject, eventdata, handles)% hObject handle to editB (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 editB as text% str2double(get(hObject,String) returns contents of editB as a double% - Executes during object creation, after setting all properties.function editB_CreateFcn(hObject, eventdata, handles)% hObject handle to editB (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 set(hObject,BackgroundColor,white);else set(hObject,BackgroundColor,get(0,defaultUicontrolBackgroundColor);end% - Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)close(gcf)% 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)% - Executes on key press over pushbutton2 with no controls selected.function pushbutton2_KeyPressFcn(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)% - Executes on ke
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026综合类-肿瘤内科主治医师-肿瘤内科相关专业知识历年真题摘选带答案详解
- 2026综合类-江苏住院医师耳鼻咽喉科Ⅱ阶段-颈部应用解剖学及生理学历年真题摘选带答案详解
- 2026综合类-新闻记者主持人资格考试-出版物发行员考试历年真题摘选带答案详解
- 2026综合类-房地产基本制度与政策-第二章建设用地制度与政策历年真题摘选带答案详解
- 2026综合类-山东住院医师放射诊断科Ⅱ阶段-骨与关节历年真题摘选带答案详解
- 2026综合类-土地管理基础与法规-法的基础知识及《宪法》等历年真题摘选带答案详解
- 2026综合类-医学影像住院医师-其他科室历年真题摘选带答案详解
- 2026综合类-冲压工考试-高级冲压工历年真题摘选带答案详解
- 2026综合类-临床医学检验技术(士)-放射免疫技术历年真题摘选带答案详解
- 2026综合类-中医耳鼻喉科(医学高级)-伤寒论历年真题摘选带答案详解
- 2025年设备监理师职业资格考试(设备工程项目管理)历年参考题库含答案详解
- 水利水电工程脚手架搭设专项方案
- 2026年下半年中小学教师资格考试综合素质(中学)笔试真题及答案
- 2026秋新版历史九年级上册教学课件:第一单元文明的产生和古代亚非文明 单元小结复习
- 2026-2027第一学期四年级上册语文教学计划及教学进度安排
- IEC TR 62595-1-62025 显示器照明装置 第1-6部分用于背光装置的量子点薄膜和量子点扩散板标准立项发展报告
- 2026太仓市城市发展集团有限公司第一批公开招聘6人考试参考题库及答案详解
- 天津市河东区2025-2026学年九年级上学期12月月考英语试题(含答案)
- 2026年秋季开学小学收心归位习惯养成教育课件
- 2026年部编版新教材道德与法治五年级上册全套教学设计(共4个单元有教学计划)
- DEK印刷机-操作-编程-保养
评论
0/150
提交评论