下載本文檔
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、A1:光學(xué)諧振腔的設(shè)計(jì)設(shè)計(jì)任務(wù):有一平面鏡和曲率半徑為的凹面鏡,畫(huà)出光束發(fā)散角與腔長(zhǎng)的關(guān)系曲線。設(shè)計(jì)要求:(1)具有友好輸入輸出界面;(2)可輸入不同凹面鏡曲率半徑值,查看結(jié)果變化情況。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*.%
2、 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 bef
3、ore 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 GUIDE's Tools menu. Choose "GUI allows only one% instance to run (singleton)".% See also: GUID
4、E, 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
5、9;, 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
6、, 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
7、 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 fo
8、r 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
9、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 hand
10、le 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*1
11、01: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('腔長(zhǎng)l(cm)');ylabel('散射角(rad)'); title('光束發(fā)散角與腔長(zhǎng)的關(guān)系曲線');function editR_Callback(hObject, eventdata, handles)% hObject handle to editR (see GCBO)% event
12、data 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 cr
13、eation, 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
14、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)%
15、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 obje
16、ct 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 ha
17、ve 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, ev
18、entdata, 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)% -
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 題組18:期末綜合測(cè)試(沖刺奪分卷)-(解析版)
- 月嫂培訓(xùn)實(shí)操課件
- 手術(shù)室等級(jí)評(píng)審條款匯報(bào)
- 2025年昌吉a2貨運(yùn)從業(yè)資格證考試
- 2025年浙江從業(yè)資格貨運(yùn)資格考試題庫(kù)及答案解析
- 2025年長(zhǎng)春從業(yè)資格證貨運(yùn)題庫(kù)答案解析
- 口語(yǔ)交際 愛(ài)媽媽課件
- 2025不動(dòng)產(chǎn)附負(fù)擔(dān)贈(zèng)與契約合同范本
- 圖文預(yù)防手足口病
- 婦科腫瘤的PET-CT評(píng)估
- 2024年農(nóng)村公寓房屋買賣協(xié)議書(shū)參考樣本3篇
- 2024年山東省政府采購(gòu)專家入庫(kù)考試真題(共五套 第一套)
- 五年級(jí)數(shù)學(xué)(小數(shù)乘除法)計(jì)算題專項(xiàng)練習(xí)及答案匯編
- 初中濟(jì)南版生物實(shí)驗(yàn)報(bào)告單
- 北京郵電大學(xué)《自然語(yǔ)言處理》2023-2024學(xué)年第一學(xué)期期末試卷
- 2024年廣西安全員A證考試題及答案
- 艾滋病、乙肝、梅毒健康宣教
- 二零二四年度商務(wù)考察及交流合同
- 【初中地理】天氣與天氣預(yù)報(bào)教學(xué)課件-2024-2025學(xué)年七年級(jí)地理上冊(cè)(湘教版2024)
- 浙教版(2023)小學(xué)信息技術(shù)五年級(jí)上冊(cè)第7課《分支結(jié)構(gòu)》說(shuō)課稿及反思
- 《國(guó)有企業(yè)管理人員處分條例》學(xué)習(xí)解讀課件
評(píng)論
0/150
提交評(píng)論