MATLAB高斯光束传播轨迹的模拟_第1页
MATLAB高斯光束传播轨迹的模拟_第2页
MATLAB高斯光束传播轨迹的模拟_第3页
MATLAB高斯光束传播轨迹的模拟_第4页
MATLAB高斯光束传播轨迹的模拟_第5页
免费预览已结束,剩余7页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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 singleto

2、n*.%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

3、 B1_OpeningFunction gets called.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

4、code - DO NOT EDIT gui_Singleton = 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% -

5、Executes just before B1 is made visible.% hObjecthandle to figure% eventdatareserved - to be defined in a future version of MATLAB % handlesstructure with handles and user data (see GUIDATA)handles.output = hObject;% Update handles structure guidata(hObject, handles);% UIWAIT makes B1 wait for user

6、response (see UIRESUME)% uiwait(handles.figure1);% vargoutcell array for 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

7、 button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, 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,'

8、string');handles.B=str2double(get(handles.editB,'string'); guidata(hObject,handles);Z=-100:100;W=(handles.W0*104)*(sqrt(1+handles.B2*(Z*106). 2./(pi2*(handles.W0*104)4);plot(Z,W,'b',Z,-W,'b');% - Executes on button press in pushbutton2.function pushbutton2_Callback(hObjec

9、t, eventdata, handles)% hObjecthandle to pushbutton2 (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&

10、#39;)/1000; handles.Z=str2double(get(handles.editZ,'string')*1000;handles.f=str2double(get(handles.editf,'string')*10; L=(handles.Z-handles.f)*handles.f2/(handles.Z-handles.f)2+pi2*handles.W04/handles.B2)+handles.f;T1=-handles.Z:1:handles.Z;Y1=handles.W0*sqrt(1+T 1.2*handles.B2/(pi2*

11、handles.W04);T2=handles.Z:1:(handles.Z+2*L);W1=(handles.W0*handles.f/sqrt(handles.f-handles.Z)2+pi2*handles.W04/handles.B2);Y2=W1*sqrt(1+(T2-handles.Z-L).2/(pi2*W14/handles.B2);plot(T1,Y1,'b',T1,-Y1,'b',T2,Y2,'r',T2,-Y2,'r');% - Executes on button press in pushbutton3

12、.function pushbutton3_Callback(hObject, eventdata, handles)% hObjecthandle to pushbutton3 (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=str2dou

13、ble(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')*10;L=(handles.Z-handles.f1)*handles.f12/(handles.Z-handles.f1)2+pi2*hand

14、les.W04/handles.B2)+handles.f1;T1=-handles.Z:1:handles.Z;Y1=handles.W0*sqrt(1+T1.2*handles.B2/(pi2*handles.W04);T2=handles.Z:1:(handles.Z+L+handles.f2);W1=(handles.W0*handles.f1./sqrt(handles.f1-handles.Z)2+pi2*handles.W04./handles.B2);Y2=W1*sqrt(1+(T2-handles.Z-L). 2./(pi2*W14/handles.B2);W2=W1*sqr

15、t(1+handles.f22/(pi2*W14/handles.B2); 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, handles)% hObjecthandle to e

16、ditW0 (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 % - Exe

17、cutes 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','whi

18、te');elseset(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

19、 (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.% hObjecthandle to editB (see GCBO)% eventdatareserved - to be define

20、d 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 editZ_Callback(hO

21、bject, eventdata, handles)% hObjecthandle to editZ (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 editZ as text%str2double(get(hObject,'String') re

22、turns contents of editZ as a double % - Executes during object creation, after setting all properties.% hObjecthandle 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(

23、hObject,'BackgroundColor','white');elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'); endfunction editf_Callback(hObject, eventdata, handles)% hObjecthandle to editf (see GCBO)% eventdatareserved - to be defined in a future version of MATLAB%

24、handlesstructure with handles and user data (see GUIDATA)% Hints:get(hObject,'String') returns contents of editf as text%str2double(get(hObject,'String') returns contents of editf as a double % - Executes during object creation, after setting all properties.% hObjecthandle to editf (

25、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 ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgr

26、oundColor'); 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 data (see GUIDATA)% Hints:get(hObject,'String') returns contents of editf1 as

27、 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 version of MATLAB% Hint:edit controls usually have a white back

28、ground on Windows.%See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'); endfunction editf2_Callback(hObject, eventdata, handles)% hObjecthandle to editf2 (see GCBO)% eventdat

29、areserved - 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, after setting all properties.% hObjecthandle to editf2 (see GCBO)% eventdatareserved - to be defined in a future ve

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论