From d1b62466d81b164656588ac1c55acff15ee9ea43 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Tue, 13 May 2014 15:35:26 -0400 Subject: initial The optics_toolkit code taken from http://mercury.pr.erau.edu/~greta9a1/downloads/index.html the older version is also available at mathwork web site http://www.mathworks.com/matlabcentral/fileexchange/15459-basic-paraxial-optics-toolkit --- axial/L_.m | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 axial/L_.m (limited to 'axial/L_.m') diff --git a/axial/L_.m b/axial/L_.m new file mode 100644 index 0000000..351af31 --- /dev/null +++ b/axial/L_.m @@ -0,0 +1,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)); \ No newline at end of file -- cgit v1.2.3