MATLAB高斯光束传播轨迹的模拟.docx

上传人:scccc 文档编号:14421270 上传时间:2022-02-05 格式:DOCX 页数:11 大小:73.13KB
返回 下载 相关 举报
MATLAB高斯光束传播轨迹的模拟.docx_第1页
第1页 / 共11页
MATLAB高斯光束传播轨迹的模拟.docx_第2页
第2页 / 共11页
MATLAB高斯光束传播轨迹的模拟.docx_第3页
第3页 / 共11页
MATLAB高斯光束传播轨迹的模拟.docx_第4页
第4页 / 共11页
MATLAB高斯光束传播轨迹的模拟.docx_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《MATLAB高斯光束传播轨迹的模拟.docx》由会员分享,可在线阅读,更多相关《MATLAB高斯光束传播轨迹的模拟.docx(11页珍藏版)》请在三一文库上搜索。

1、B1: xx 光束传播轨迹的模拟设计任务:作图表示 xx 光束的传播轨迹( 1)基模高斯光束在自由空间的传播轨迹;( 2)基模高斯光束经单透镜变换前后的传播轨迹;( 3)基模高斯光束经调焦望远镜变换前后的传播轨迹。function vargout = B1(vargin)% B1 M-file forB1.fig%B1, by itself, creates a new B1 or raises the existing%singleton*.%H = B1 returns the handle to a new B1 or the handle to%the existing singlet

2、on*.%B1(CALLBACK,hObject,eventData,handles,.) calls the local%function named CALLBACK inB1.M with the given input arguments.%B1(Property,Value,.) creates a new B1 or raises the%existing singleton*.Starting from the left, property value pairs are%applied to the GUI before B1_OpeningFunction gets call

3、ed.An%unrecognized property name or invalid value makes property applicationGUIDE, GUIDATA, GUIHANDLES% Copyright 2002-2003 The MathWorks, Inc.% Edit the above text to modify the response to help B1% Last Modified by GUIDE v2.5 21-Oct-2010 17:52:32% Begin initialization code - DO NOT EDITgui_Singlet

4、on = 1;gui_State = struct(gui_Name,mfilename, .gui_Singleton,gui_Singleton, .gui_Callback,);if nargin & ischar(vargin1)gui_State.gui_Callback = str2func(vargin1);endif nargout);else);end% End initialization code - DO NOT EDIT% - Executes just before B1 is made visible.% hObjecthandle to figure% even

5、tdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)handles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes B1 wait for user response (see UIRESUME)% uiwait(handles.figure1);% vargoutcell array for

6、returning output args (see VARGOUT);% hObjecthandle to figure% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA) vargout1 = handles.output;% - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, event

7、data, handles)% hObjecthandle to pushbutton1 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)handles.W0=str2double(get(handles.editW0,string);handles.B=str2double(get(handles.editB,string);guidata(hObject,handles);

8、Z=-100:100;W=(handles.W0*10八4)*(sqrt(1+handles.BA2*(Z*10八6)八2./(p22*(handles.W0*10八4)八4);plot(Z,W,b,Z,-W,b);% - Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObjecthandle to pushbutton2 (see GCBO)% eventdatareserved - to be defined in a future v

9、ersion of MATLAB% handlesstructure with handles and user data (see GUIDATA)handles.W0=str2double(get(handles.editW0,string);handles.B=str2double(get(handles.editB,string)/1000;handles.Z=str2double(get(handles.editZ,string)*1000;handles.f=str2double(get(handles.editf,string)*10;L=(handles.Z-handles.f

10、)*handles.fA2/(handles.Z- handles.f)A2+piA2*handles.W0A4/handles.BA2)+handles.f;T1=-handles.Z:1:handles.Z;Y1=handles.W0*sqrt(1+T1.A2*handles.BA2/(piA2*handles.W0A4);T2=handles.Z:1:(handles.Z+2*L);W1=(handles.W0*handles.f/sqrt(handles.f-handles.Z)八2+p/2*handles.W0A4/handles.BA2);Y2=W1*sqrt(1+(T2-hand

11、les.Z- L).A2/(piA2*W1A4/handles.BA2);plot(T1,Y1,b,T1,-Y1,b,T2,Y2,r,T2,-Y2,r);% - Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)4. hObjecthandle to pushbutton3 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstruc

12、ture with handles and user data (see GUIDATA)handles.W0=str2double(get(handles.editW0,string);handles.B=str2double(get(handles.editB,string)/1000;handles.f1=str2double(get(handles.editf1,string)*10;handles.Z=str2double(get(handles.editZ,string)*1000;handles.f2=str2double(get(handles.editf2,string)*1

13、0;L=(handles.Z-handles.f1)*handles.f1A2/(handles.Z-handles.f1)A2+piA2*handles.W0A4/handles.BA2)+handles.f1;T1=-handles.Z:1:handles.Z;Y1=handles.W0*sqrt(1+T1.A2*handles.BA2/(piA2*handles.W0A4);T2=handles.Z:1:(handles.Z+L+handles.f2);W1=(handles.W0*handles.f1./sqrt(handles.f1-handles.Z)A2+piA2*handles

14、.W0A4./handles.BA2);Y2=W1*sqrt(1+(T2-handles.Z-L)八2./(piA2*W1A4/handles.BA2);W2=W1*sqrt(1+handles.f2A2/(piA2*W1A4/handles.BA2);T3=(handles.Z+L+handles.f2):1:3*(handles.Z+L+handles.f2);Y3=W2;plot(T1,Y1,b,T1,-Y1,b,T2,Y2,r,T2,-Y2,r,T3,Y3,g,T3,-Y3,g);grid on;function editW0_Callback(hObject, eventdata,

15、handles)% hObjecthandle to editW0 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)% Hints:get(hObject,String) returns contents of editW0 as text%str2double(get(hObject,String) returns contents of editW0 as a double

16、% - Executes during object creation, after setting all properties.% hObjecthandle to editW0 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% Hint:edit controls usually have a white background on Windows.%See ISPC and COMPUTER.if ispcset(hObject,BackgroundColor,white);else

17、set(hObject,BackgroundColor,get(0,defaultUicontrolBackgroundColor); endfunction editB_Callback(hObject, eventdata, handles)% hObjecthandle to editB (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)% Hints:get(hObjec

18、t,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.% hObjecthandle to editB (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% Hint:edit controls u

19、sually have a white background on Windows.%See ISPC and COMPUTER.if ispcset(hObject,BackgroundColor,white);elseset(hObject,BackgroundColor,get(0,defaultUicontrolBackgroundColor);endfunction editZ_Callback(hObject, eventdata, handles)% hObjecthandle to editZ (see GCBO)% eventdatareserved - to be defi

20、ned in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)% Hints:get(hObject,String) returns contents of editZ as text%str2double(get(hObject,String) returns contents of editZ as a double% - Executes during object creation, after setting all properties.% hObjecthan

21、dle to editZ (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% Hint:edit controls usually have a white background on Windows.%See ISPC and COMPUTER.if ispcset(hObject,BackgroundColor,white);elseset(hObject,BackgroundColor,get(0,defaultUicontrolBackgroundColor); endfunction

22、 editf_Callback(hObject, eventdata, handles)% hObjecthandle to editf (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)% Hints:get(hObject,String) returns contents of editf as text%str2double(get(hObject,String) retu

23、rns contents of editf as a double% - Executes during object creation, after setting all properties.% hObjecthandle to editf (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% Hint:edit controls usually have a white background on Windows.%See ISPC and COMPUTER.if ispcset(hOb

24、ject,BackgroundColor,white);elseset(hObject,BackgroundColor,get(0,defaultUicontrolBackgroundColor); endfunction editf1_Callback(hObject, eventdata, handles)% hObjecthandle to editf1 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user da

25、ta (see GUIDATA)% Hints:get(hObject,String) returns contents of editf1 as text%str2double(get(hObject,String) returns contents of editf1 as a double% - Executes during object creation, after setting all properties.% hObjecthandle to editf1 (see GCBO)% eventdatareserved - to be defined in a future ve

26、rsion of MATLAB% Hint:edit controls usually have a white background on Windows.%See ISPC and COMPUTER.if ispcset(hObject,BackgroundColor,white);elseset(hObject,BackgroundColor,get(0,defaultUicontrolBackgroundColor); endfunction editf2_Callback(hObject, eventdata, handles)% hObjecthandle to editf2 (s

27、ee GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)% Hints:get(hObject,String) returns contents of editf2 as text%str2double(get(hObject,String) returns contents of editf2 as a double % - Executes during object creation

28、, after setting all properties.10 / 12% hObjecthandle to editf2 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% Hint:edit controls usually have a white background on Windows.%See ISPC and COMPUTER.if ispcset(hObject,BackgroundColor,white);elseset(hObject,BackgroundColor,

29、get(0,defaultUicontrolBackgroundColor); end% - Executes on mouse press over axes background.% hObjecthandle to axes1 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)% - Executes on button press in pushbutton4.funct

30、ion pushbutton4_Callback(hObject, eventdata, handles)close(gcf)% hObjecthandle to pushbutton4 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA)% - Executes on key press over pushbutton4 with no controls selected.% hObjecthandle to pushbutton4 (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB% handlesstructure with handles and user data (see GUIDATA) 11 / 12

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1