No BSD License  

Highlights from
basic paraxial optics toolkit

image thumbnail
from basic paraxial optics toolkit by Andri M. Gretarsson
A set of paraxial optics functions for beam propagation and modal decomposition. Numerous examples.

qfactor=q_(w,R,varargin)
%---------------------------------------------------------------
% Returns the q-factor of a Gaussian beam given the spot size,
% phasefront radius of curvature and wavelength.
%
% SYNTAX: qfactor=q_(w,R <,lambda>);
%
% w      = 1/e Field radius 
% R      = Radius of curvature of phasefront
% lambda = wavelength
%
% Any one of w, R and lambda may be a vectors or scalars.
% If more than one of w, R and lambda is a vector, all 
% vectors supplied must be the same size.
%
%---------------------------------------------------------------
% SYNTAX: qfactor=q_(w,R <,lambda>);
%---------------------------------------------------------------

function qfactor=q_(w,R,varargin)

if nargin>=3, lambda=varargin{1}; else lambda=1064e-9/0.0254; end

qfactor=pi*w.^2.*R./(pi*w.^2-i.*R.*lambda);

Contact us at files@mathworks.com