blob: 351af31d496e86b84caa0d0004c3b4faa940216a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
%---------------------------------------------------------------
% Given the q-factor and wavelength of a beam, this function
% returns the position and size of the waist.
%
% SYNTAX: [L <,w0>]=L_(q <,lambda>);
% <...> indicates optional arguments
%
% q = q-factor of the beam at the position where R and w are to
% be found. q can be a vector
% lambda = wavelength. Can be a vector or scalar.
%
% If both q and lambda are vectors, they must be the same size.
%
%---------------------------------------------------------------
% SYNTAX: [L <,w0>]=L_(q <,lambda>);
%---------------------------------------------------------------
function [L,w0]=L_(q,varargin);
if nargin>=2, lambda=varargin{1}; else lambda=1064e-9; end
w0=sqrt(-lambda/pi./imag(1./q));
L=-real(q).*ones(size(w0));
|