• 大小: 51KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-02
  • 语言: Matlab
  • 标签: matlab  激光  

资源简介

近轴光束在厄米 - 高斯和拉盖尔 - 高斯基中的分解和可视化。光传输,包括双镜面法布里珀罗腔。

资源截图

代码片段和文件信息

% Accepts the q factor of a Gaussian beam and plots the 1/e^2 intensity envelope.

% SYNTAX: [handlexendyend]=beamplot(qz%                                         attitudesplotsuppress>);
%
% INPUT ARGUMENTS:
% q         = Gaussian beam complex radius of curvature “q“.
%             If q is a vector a beam is plotted for each element.
% z         = vector along beam axis over which to plot the envelope
% xy       = position of the point at which q is specified default=00.
% theta     = rotation of optic axis counterclockwise relative to x-axis
%             defaul=0
% lambda    = wavelength default=1064 nm or 4.189e-5 inches
% plotsuppress  = set to 1 to suppress plotting default 0.
%
% OUTPUT ARGUMENTS:
% handle    = handle of the trace plotted
% xendyend = position of the end of the optic axis over which the beam
%             was plotted.
%
% Last Modified: June 23 2004 by Andri M. Gretarsson.
%
%--------------------------------------------------------------------------------
% SYNTAX: [handlexendyend]=beamplot(qz);
%--------------------------------------------------------------------------------

function [handlexendyendposrotpos]=beamplot(qzvarargin)

if nargin>=3 x=varargin{1}; else x=0; end
if nargin>=4 y=varargin{2}; else y=0; end
if nargin>=5 theta=varargin{3}*pi/180; else theta=0; end
if nargin>=6 n=varargin{4}; else n=1; end
if nargin>=7 lambda=varargin{5}; else lambda=1064e-9/0.0254; end
if nargin>=9 plotsuppress=varargin{7}; else plotsuppress=0; end

if size(z1)>size(z2)
    z=transpose(z);
end
if size(q1)    q=transpose(q);
end
lambda=lambda/n;
[Lw0]=L_(qlambda);

w_upper=zeros(length(L)length(z)); w_lower=w_upper; xend=zeros(length(L)); yend=xend;
handle=zeros(2length(L)); plotcolors=colormap;

for s=1:length(L)
    w_upper=w0(s)*sqrt(1+(lambda*(z-L(s))/pi/w0(s)^2).^2);
    w_lower=w_upper;

    upperenv=[z;w_upper];
    lowerenv=[z;-w_lower];
    rotmat=[[cos(theta) -sin(theta)];[sin(theta) cos(theta)]];
    rotupperenv=rotmat*upperenv;
    rotupperenv(1:)=rotupperenv(1:)+x;
    rotupperenv(2:)=rotupperenv(2:)+y;
    rotlowerenv=rotmat*lowerenv;
    rotlowerenv(1:)=rotlowerenv(1:)+x;
    rotlowerenv(2:)=rotlowerenv(2:)+y;

    xend=max(z)*cos(theta)+x;
    yend=max(z)*sin(theta)+y;

    if plotsuppress~=1
        if s==1
            orighold=get(gca‘nextplot‘);
            handle(:s)=plot(rotupperenv(1:)rotupperenv(2:)‘b-‘rotlowerenv(1:)rotlowerenv(2:)‘b-‘);
            set(handle(:s)‘color‘plotcolors(mod(send)+1:));
        else
            set(gca‘nextplot‘‘add‘);
            handle(:s)=plot(rotupperenv(1:)rotupperenv(2:)‘b-‘rotlowerenv(1:)rotlowerenv(2:)‘b-‘);
            set(handle(:s)‘color‘plotcolors(mod(send)+1:));            
        end
        if s==length(L)
            set(gca‘nextplot‘orighol

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         775  2007-06-30 23:21  examples\LGIplot.m
     文件        1014  2007-06-30 23:38  examples\AiryIplot.m
     文件        2845  2007-06-30 23:34  examples\Hermite_demo.m
     文件         611  2007-06-30 23:21  examples\NRIplot.m
     文件        3850  2007-06-30 23:35  examples\Laguerre_demo.m
     文件         525  2007-06-30 23:38  examples\Airy1Dplot.m
     文件        1673  2007-06-30 23:37  examples\gaussian_topview.m
     文件        6556  2007-06-30 23:19  examples\unstable_cavity.m
     文件       20214  2005-10-19 17:40  examples\A_beam_visualization_script_support\beam_visualize_asbuilt.m
     文件       12658  2005-10-19 17:40  examples\A_beam_visualization_script_support\beam_propagate_llo_asbuilt.m
     文件       20822  2007-07-01 01:23  examples\A_beam_visualization_script.m
     文件        1494  2005-10-19 17:40  sharedfiles\dispmat.m
     文件        1878  2005-10-19 17:40  sharedfiles\figtext.m
     文件        1060  2007-07-01 01:30  sharedfiles\scalemarker.m
     文件        2266  2007-06-30 23:00  sharedfiles\figtext3D.m
     文件        3460  2005-10-19 17:40  sharedfiles\plothorline.m
     文件        3543  2005-10-19 17:40  sharedfiles\plotvertline.m
     文件         104  2007-07-01 01:30  sharedfiles\reverse.m
     文件         187  2005-10-19 17:40  sharedfiles\fact.m
     文件         923  2007-07-01 01:24  axial\beamradius.m
     文件        3030  2007-06-30 20:50  axial\beamplot.m
     文件         750  2005-10-19 17:40  axial\w_.m
     文件         765  2005-10-19 17:40  axial\w0_.m
     文件         809  2005-10-19 17:40  axial\q_.m
     文件         578  2005-10-19 17:40  axial\slab.m
     文件         521  2005-10-19 17:40  axial\mirr.m
     文件        3811  2005-10-19 17:40  axial\lensplot.m
     文件         874  2005-10-19 17:40  axial\L_.m
     文件         578  2005-10-19 17:40  axial\fdie.m
     文件         314  2005-10-19 17:40  axial\elems.m
     文件         806  2005-10-19 17:40  axial\sdie.m
............此处省略21个文件信息

评论

共有 条评论