1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
%--------------------------------------------------------------------
% Propagates a Gaussian beam with complex radius of curvature q1
% using the ABCD parameters supplied. Returns the new q and the
% new amplitude factor p = 1/(A+B/q1)^(1+l+m) by which the field is
% multiplied. (See eqn 4.7.30 in Principles of Lasers by O. Svelto.)
% If q1 is a vector or matrix, q and p will be vectors or matrixes
% of the same size. If the ABCD parameters are vectors or matrixes
% (while q1 is a scalar) then q an d p will be vectors or matrixes
% of the same size. This last feature is the main difference
% between this function and "prop.m".
%
% For a Hermite Gaussian l,m are the mode designators.
% For a Laguerre Gaussian l=2p and m is the usual m.
%
% SYNTAX: [q,p]=prop2(q1,A,B,C,D,<,[l,m]>);
% <...> indicates optional arguments
%--------------------------------------------------------------------
function [q,p]=prop2(q1,A,B,C,D,varargin)
if nargin>=6, mode=varargin{1}; else mode=[0,0]; end
ell=mode(1);
emm=mode(2);
q = (A*q1 + B)./(C*q1 + D);
p = 1./(A+B./q1).^(1+ell+emm);
|