1/12B1:xx光束传播轨迹的模拟设计任务:作图表示xx光束的传播轨迹(1)基模高斯光束在自由空间的传播轨迹;(2)基模高斯光束经单透镜变换前后的传播轨迹;(3)基模高斯光束经调焦望远镜变换前后的传播轨迹。functionvargout=B1(vargin)%B1M-fileforB1.fig%B1,byitself,createsanewB1orraisestheexisting%singleton*.%%H=B1returnsthehandletoanewB1orthehandleto%theexistingsingleton*.%%B1('CALLBACK',hObject,eventData,handles,...)callsthelocal%functionnamedCALLBACKinB1.Mwiththegiveninputarguments.%%B1('Property','Value',...)createsanewB1orraisesthe%existingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforeB1_OpeningFunctiongetscalled.An%unrecognizedpropertynameorinvalidvaluemakespropertyapplicationGUIDE,GUIDATA,GUIHANDLES%Copyright2002-2003TheMathWorks,Inc.%EdittheabovetexttomodifytheresponsetohelpB12/12%LastModifiedbyGUIDEv2.521-Oct-201017:52:32%Begininitializationcode-DONOTEDITgui_Singleton=1;gui_State=struct('gui_Name',mfilename,...'gui_Singleton',gui_Singleton,...'gui_Callback',[]);ifnargin&&ischar(vargin{1})gui_State.gui_Callback=str2func(vargin{1});endifnargout});else});end%Endinitializationcode-DONOTEDIT%---ExecutesjustbeforeB1ismadevisible.%hObjecthandletofigure3/12%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)handles.output=hObject;%Updatehandlesstructureguidata(hObject,handles);%UIWAITmakesB1waitforuserresponse(seeUIRESUME)%uiwait(handles.figure1);%vargoutcellarrayforreturningoutputargs(seeVARGOUT);%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)vargout{1}=handles.output;%---Executesonbuttonpressinpushbutton1.functionpushbutton1_Callback(hObject,eventdata,handles)%hObjecthandletopushbutton1(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)handles.W0=str2double(get(handles.editW0,'string'));4/12handles.B=str2double(get(handles.editB,'string'));guidata(hObject,handles);Z=-100:100;W=(handles.W0*10^4)*(sqrt(1+handles.B^2*(Z*10^6).^2./(pi^2*(handles.W0*10^4)^4)));plot(Z,W,'b',Z,-W,'b');%---Executesonbuttonpressinpushbutton2.functionpushbutton2_Callback(hObject,eventdata,handles)%hObjecthandletopushbutton2(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)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)*handles.f^2/((handles.Z-handles.f)^2+pi^2*handles.W0^4/handles.B^2)+handles.f;T1=-handles.Z:1:handles.Z;Y1=handles.W0*sqrt(1+T1.^2*handles.B^2/(pi^2*handles.W0^4));T2=handles.Z:1:(handles.Z+2*L);5/12W1=(handles.W0*handles.f/sqrt((handles.f-handles.Z)^2+pi^2*handles.W0^4/handles.B^2));Y2=W1*sqrt(1+(T2-handles.Z-L).^2/(pi^2*W1^4/handles.B^2));plot(T1,Y1,'b',T1,-Y1,'b',T2,Y2,'r',T2,-Y2,'r');%---Executesonbuttonpressinpushbutton3.functionpushbutton3_Callback(hObject,eventdata,handles)%hObjecthandletopushbutton3(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)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'))*10;L=(handles.Z-handles.f1)*handles.f1^2/((handles.Z-handles.f1)^2+pi^2*handles.W0^4/handles.B^2)+handles.f1;T1=-handles.Z:1:handles.Z;Y1=handles.W0*sqrt(1+T1.^2*handles.B^2/(pi^2*handles.W0^4));T2=handles.Z:1:(handles.Z+L+handles.f2);W1=(handles.W0*handles.f1./sqrt((handles.f1-handles.Z)^2+pi^2*handles.W0^6/124./handles.B^2));Y2=W1*sqrt(1+(T2-handles.Z-L).^2./(pi^2*W1^4/handles.B^2));W2=W1*sqrt(1+handles.f2^2/(pi^2*W1^4/handles.B^2));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');gridon;functioneditW0_Callback(hObject,eventdata,handles)%hObjecthandletoeditW0(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String')returnscontentsofeditW0astext%str2double(get(hObject,'String'))returnscontentsofeditW0asadouble%---Executesduringobjectcreation,aftersettingallproperties.%hObjecthandletoeditW0(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.%SeeISPCandCOMPUTER.ifispc7/12set(hObject,'BackgroundColor','white');elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunctioneditB_Callback(hObject,eventdata,handles)%hObjecthandletoeditB(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,'String')returnscontentsofeditBastext%str2double(get(hObject,'String'))returnscontentsofeditBasadouble%---Executesduringobjectcreation,aftersettingallproperties.