Matlab Help Text
Matlab Help Text
asec
CSC
acsc
cot
acot
exp
log
logic
sqrt
abs
angle
conj
imag
real
fix
floor
ceil
round
mod
rem
sign
norm
rank
det
expm
logm
sqrtm
max
min
mean
median
std
sort
sortrows
sum
prod
hist
diff
gradient
fft
plot
ioglog semilogx semilogy polar
plotyy
Inverse Secant.
Cosecant.
Inverse Cosecant.
Cotangent.
Inverse Cotangent.
Exponential.
Natural logarithm.
- Common (base 10) logarithm.
Square root.
Absolute value.
Phase angle.
complex conjugate.
complex imaginary part.
complex real part.
Round towards zero.
Round towards Minus Infinity.
Round towards Plus Infinity.
Round towards nearest Integer.
- Modulus (signed remainder after division).
remainder after division.
Signum.
Matrix or vector norm.
Matrix rank.
Determinant.
Matrix Exponential.
Matrix logarithm.
Matrix Square root.
Largest component.
Smallest component.
Average or mean value.
Median value.
Standard deviation.
Sort in ascending order.
Sort rows in ascending order.
Sum of elements.
product of elements.
Histogram.
Difference and approximate derivative.
approximate gradient.
Discrete Fourier transform.
Linear plot.
Log-log scale plot.
Semi-log scale plot.
Semi-log scale plot.
Polar coordinate plot.
Graphs with y tick labels on the left and right.
Page 2
matlab-help-text
axis
zoom
grid
legend title
xiabel ylabel mesh
surf
fills
colormap
figure
axes
char
strcat
num2str
int2str
fopen
fclose
fread
fwrite
fscanf
fprintf
fgetl
fgets
input
cIc
home
pause
now
date
clock
abs
what
lookfor
which
path
echo
more
diary
format
delete
if
else
elseif
end
Page 3
matlab-help-text
for
while
break
switch
case
otherwise
return
reshape
flipdim
rot90
find
end
eps
realmax
realmin
why
sinh
asinh
cosh
acosh
tanh
atanh
sech
asech
csch
acsch
coth
acoth
log2
pow2
nextpow2
cumsum
cumprod
corrcoef
cov
fft2
fftn
roots
residue
conv
deconv
double
sprintf
sscanf
demo
ver
Hyperbolic Cotangent.
'
Inverse Hyperbolic Cotangent.
\
- Base 2 logarithm and dissect floating point number.
- Base 2 power and scale floating point number.
- Next higher power of 2.
|
Cumulative Sum of elements.
i
Cumulative product of elements.
Correlation coefficients.
j
Covariance matrix.
L_
two-dimensional Discrete Fourier transform.
N-dimensional Discrete Fourier transform.
Find Polynomial roots.
- Partial-fraction expansion (residues).
multiply polynomials.
divide polynomials.
Convert string to numeric character codes.
Write formatted data to string.
Read string under format control.
Run demonstrations.
MATLAB, SIMULINK, and toolbox version infornlation.
Page 4
matlab-help-text
addpath
rmpath
editpath
!
dos
Unix
vms
fliplr
flipud
pack
Pages
General information
Managing the workspace.
Managing commands anci functions.
Managing the search path
Controlling the command window.
Operating system commands
Debugging M-files.
Profiling M-files.
Matrix
functions
T^niperical
linear
algebra.
Matrix analysis.
Linear ecjuations.
Eigenvalues and singular values.
Matrix functions.
Factorization utilities
Interpolation
and polynomials.
Data interpolation.
Spline interpolation.
Geometric analysis.
Polynomials.
Sparse matrices.
Elementary sparse matrices.
Full to sparse conversion.
Working with sparse matrices.
Reordering algorithms.
Linear algebra.
Linear Equations (iterative methods).
Operations on graphs (trees).
Miscellaneous.
Specialized
graphs.
Handle Graphics.
Figure window creation and control.
Axis creation and control.
Handle Graphics objects.
Handle Graphics operations.
Hardcopy and printing.
Utilities.
Character
strings.
General.
String tests.
String operations.
String to number conversion.
Base n\imber conversion.
File
input/outPut.
File opening and closing.
Binary file I/O.
Formatted file I/O.
String conversion.
File positioning.
File name handling
File import/export functions.
Image file import/export.
Audio file import/export.
Command window I/O
Signal
Processing
Toolbox.
Waveform generation.
Filter analysis and implementation.
Linear system transformations.
IIR digital filter design.
IIR filter order selection.
FIR filter design.
Transforms.
Statistical signal processing and spectral analysis.
Windows.
Parametric modeling.
Specialized operations.
Analog lowpass filter prototypes.
Freciuency translation.
Filter discretization.
Other.
Signal GUI (Graphical User Interface).
Demonstrations.
PymTnr^\C
Math
TOOlbOX.
Calculus.
Linear Algebra.
Simplification.
Solution of Ecjuations.
Variable Precision Arithmetic.
Integral Transforms.
Conversions.
Basic Operations.
Special Functions.
String handling utilities.
Pedagogical and Graphical Applications.
Demonstrations.
Access to Maple. (Not available with Student Edition.)
General information
help
- On-line help, display text at command line.
helpwin
- On-line help, separate window for navigation.
helpdesk
- Comprehensive hypertext documentation and troubleshooting.
demo
- Run demonstrations.
ver
- MATLAB, SIMULINK, and toolbox version information.
whatsnew
- Display Readme files.
Readme
- What' s new in MATLAB 5 .
Managing the workspace.
who
- List current variables.
whos
- List current variables, long form.
clear
- Clear variables and functions from memory.
pack
- Consolidate workspace memory.
load
- Load workspace variables from disk.
save
- Save workspace variables to disk.
ciuit
- Quit MATLAB session.
Managing commands and functions.
what
- List MATLAB-specific files in directory.
type
- List M-file.
edit
- Edit M-file.
lookfor
- Search all M-files for keyword.
which
- Locate functions and files.
pcode
- Create pre-parsed pseudo-code file (P-file)
inmem
- List functions in memory.
mex
- Compile MEX-function.
Managing the search path
path
- Get/set search path,
addpath
- Add directory to search path,
rmpath
- Remove directory from search path,
editpath
- Modify search path.
Controlling the command window.
echo
- Echo commands in M-files.
more
- Control paged output in command window.
diary
- Save text of MATLAB session.
format
- Set output format.
Operating system commands
cd
- Change current working directory.
pwd
- Show (print) current working directory.
dir
- List directory.
delete
- Delete file.
getenv
- Get environment variable.
!
- Execute operating system command.
dos
- Execute DOS command and return result.
Unix
- Execute UNIX command and return result.
vms
- Execute VMS DCL command and return result.
web
- Open Web browser on site or files.
computer
- Computer type.
Debugging M-files.
debug
- List debugging commands.
dbstop
- Set breakpoint.
(Sbclear
- Remove breakpoint.
dbcont
- Continue execution.
dbdovm
- Change local workspace context.
cibstack
- Display function call stack.
dbstatus
- List all brea]cpoints.
dbstep
- Execute one or more lines.
dbtype
- List M-file with line numbers.
dbup
- Change local workspace context.
dlxjuit
- Quit debug mode.
dbmex
- Debug MEX-files (UNIX only).
Profiling M-files.
profile
- Profile M-file execution time.
+
+
.
*
/v
A
'\
/
.\
./
kron
==
~=
<
>
<=
>=
Logical operators.
and
- Logical AND
&
or
- Logical OR
|
not
- Logical NOT
xor
- Logical EXCLUSIVE OR
any
- True if any element of vector is nonzero
all
- True if all elements of vector are nonzero
Special characters.
colon
par en
paren
paren
paren
paren
punct
punct
punct
punct
punct
punct
punct
punct
pxinct
punct
transpose
ctranspose
horzcat
vertcat
subsasgn
subsref
subsindex
- Colon
- Parentheses and subscripting
- Parentheses and siibscripting
- Brackets
- Braces and subscripting
- Braces and subscripting
- Decimal point
- Structure field access
- Parent directory
- Continuation
- Separator
- Semicolon
- Comment
- Invoke operating system command
- Assignment
- Quote
- Transpose
- Complex conjugate transpose
- Horizontal concatenation
- Vertical concatenation
- Subscripted assignment
- Subscripted reference
- Subscript index
Bitwise operators.
bitand
- Bit-wise AND.
bitcmp
- Complement bits.
bitor
- Bit-wise OR.
bitmax
- Maximum floating point integer.
bitxor
- Bit-wise XOR.
bitset
- Set bit.
bitget
- Get bit.
bitshift
- Bit-wise shift.
Set operators.
union
unique
intersect
setdiff
setxor
ismerrODer
-
Set union.
Set unicjue.
Set intersection.
Set difference.
Set exclusive-or.
True for set member.
(
(
[
{
{
i!:
=
[ 1
[ ]
( ) { )
( ) { }
Programming
language constructs.
Control flow.
if
- Conditionally execute statements.
else
- IF statement condition.
elseif
- IF statement condition.
end
- Terminate scope of FOR, WHILE, SWITCH and IF statements.
for
- Repeat statements a specific number of times.
while
- Repeat statements an indefinite number of times.
break
- Terminate execution of WHILE or FOR loop.
switch
- Switch among several cases based on expression.
case
- SWITCH statement case.
otherwise
- Default SWITCH statement case.
return
- Return to invoking function.
Evaluation and execution.
eval
- Execute string with MATLAB expression.
feval
- Execute function specified by string.
evalin
- Evaluate expression in workspace.
builtin
- Execute built-in function from overloaded method.
assignin
- Assign variable in workspace.
run
- Run script.
Scripts, functions, and variables.
script
- About MATLAB scripts and M-files.
function
- Add new function.
global
- Define global variable.
mfilename
- Name of currently executing M-file.
lists
- Comma separated lists.
exist
- Check if variables or functions are defined.
isglobal
- True for global variables.
Argument handling.
nargchk
Validate number of input arguments.
nargin
Number of function input arguments.
Number of function output arguments.
nargout
Variable length input argument list.
varargin
Variable length output argument list.
varargout
Input argiiment name.
inputname
Message display,
error
Display error message and abort function.
warning
Display warning message.
lasterr
Last error message.
errortrap
Skip error during testing.
disp
Display an array.
fprintf
Display formatted message.
sprintf
Write formatted data to a string.
Interactive input.
input
- Prompt for user input.
keyboard
- Invoke keyboard from M-file.
pause
- Wait for user response,
uimenu
- Create user interface menu,
uicontrol
- Create user interface control.
- Exponential.
- Natural logarithm.
- Common (base 10) logarithm.
- Base 2 logarithm and dissect floating point number.
- Base 2 power and scale floating point number.
- Scjuare root.
- Next higher power of 2.
Complex.
abs
angle
conj
imag
real
unwrap
isreal
cplxpair
Absolute value.
Phase angle.
Complex conjugate.
Complex imaginary part.
Complex real part.
Unwrap phase angle.
True for real array.
Sort numbers into complex conjugate pairs.
Correlation coefficients.
Covariance matrix.
Angle between subspaces.
Interpolation
and polynomials.
Data interpolation.
interpl
- 1-D interpolation (table lookup).
interplq
- Quick 1-D linear interpolation,
interpft
- 1-D interpolation using FFT method.
interp2
- 2-D interpolation (table lookup).
interp3
- 3-D interpolation (table loo)cup) .
interpn
- N-D interpolation (table lookup).
griddata
- Data gridding and surface fitting.
Spline interpolation.
spline
- Cubic spline interpolation,
ppval
- Evaluate piecewise polynomial.
Geometric analysis,
delaunay
Delaunay triangulation.
dsearch
- Search Delaunay triagulation for nearest point.
tsearch
- Closest triangle search.
convhull
- Convex hull.
voronoi
- Voronoi diagram.
inpolygon
- True for points inside polygonal region.
rectint
- Rectangle intersection area.
polyarea
- Area of polygon.
Polynomials.
roots
poly
polyval
polyvalm
residue
polyfit
polyder
conv
deconv
functions.
- Time series ODE output function.
- 2-D phase plane ODE output function.
- 3-D phase plane ODE output function,
- Command window printing ODE output function.
Sparse matrices.
Elementary sparse matrices.
speye
- Sparse identity matrix.
sprand
- Sparse uniformly distributed random matrix.
sprancJn
- Sparse normally distributed random matrix.
sprandsym
- Sparse random symmetric matrix.
spdiags
- Sparse matrix formed from diagonals.
Full to sparse conversion.
sparse
- Create sparse matrix.
full
- Convert sparse matrix to full matrix,
find
- Find indices of nonzero elements,
spconvert
- Import from sparse matrix external format.
Working with sparse matrices.
nnz
- Number of nonzero matrix elements.
nonzeros
- Nonzero matrix elements.
nzmax
- Amount of storage allocated for nonzero matrix elements.
spones
- Replace nonzero sparse matrix elements with ones.
spalloc
- Allocate space for sparse matrix.
issparse
- True for sparse matrix.
spfun
- Apply function to nonzero matrix elements.
spy
- Visualize sparsity pattern.
Reordering algorithms.
colmmd
Column minimum degree permutation.
symmmd
- Symmetric minimum degree permutation.
symrcm
- Symmetric reverse Cuthill-McKee permutation.
- Column permutation.
colperm
randperm
- Random permutation.
- Dulmage-Mendelsohn permutation.
cjmperm
Linear algebra,
eigs
svds
luinc
choline
normest
condest
sprank
A few eigenvalues.
A few singular values.
Incomplete LU factorization.
Incomplete Choles)cy factorization.
Estimate the matrix 2-norm.
1-norm condition number estimate.
Structural rank.
Linear Ecjuations
peg
bicg
bicgstab
cgs
gmres
cjmr
-
(iterative methods) .
Preconditioned Conjugate Gradients Method.
BiConjugate Gradients Method.
BiConjugate Gradients Stabilized Method.
Conjugate Gradients Scjuared Method.
Generalized Minimirai Residual Method.
Quasi-Minimal Residual Method.
Operations on
treelayout
treeplot
etree
etreeplot
gplot
graphs (trees).
- Lay out tree or forest.
- Plot picture of tree.
- Elimination tree.
- Plot elimination tree.
- Plot graph, as in "graph theory".
Miscellaneous.
symbfact
- Symbolic factorization analysis.
spparms
- Set parameters for sparse matrix routines.
spaugment
- Form least scjuares augmented system.
printing.
- Print graph or SIMULINK system; or save graph to M-file.
- Printer defaults,
- Set paper orientation.
Lighting,
surfl
lighting
material
specular
diffuse
surfnorm
Color maps.
hsv
hot
gray
bone
copper
pink
white
flag
lines
colorcube
jet
prism
cool
autiimn
spring
winter
summer
Axis control,
axis
zoom
grid
box
hold
axes
subplot
Viewpoint control.
view
- 3-D graph viewpoint specification.
viewmtx
- View transformation matrix.
rotate3d
- Interactively rotate view of 3-D plot.
Graph annotation.
title
- Graph title.
xiabel
- X-axis label.
ylabel
- Y-axis label.
zlabel
- Z-axis label.
colorbar
- Display color bar (color scale).
text
- Text annotation.
gtext
- Mouse placement of text.
Hardcopy and
print
printopt
orient
printing.
- Print graph or SIMULINK system; or save graph to M-file.
- Printer defaults,
- Set paper orientation.
Specialized
graphs.
Handle Graphics.
Figure window creation and control,
ficfure
- Create figure window,
gcf
- Get handle to current figure,
elf
- Clear current figure,
shg
- Show graph window,
close
- Close figure,
refresh
- Refresh figure.
Axis creation and control.
subplot
- Create axes in tiled positions.
axes
- Create axes in arbitrary positions.
gca
- Get handle to current axes.
cla
- Clear current axes.
axis
- Control axis scaling and appearance.
box
- Axis box.
caxis
- Control pseudocolor axis scaling.
hold
- Hold current graph.
ishold
- Return hold state.
Handle Graphics objects.
figure
- Create figure window.
axes
- Create axes.
line
- Create line.
text
- Create text.
patch
- Create patch.
surface
- Create surface.
image
- Create image.
light
- Create light.
uicontrol - Create user interface control.
uimenu
- Create user interface menu.
Handle Graphics operations.
set
- Set object properties.
get
- Get object properties.
reset
- Reset object properties.
delete
- Delete object.
gco
- Get handle to current object.
gcbo
- Get handle to current callback object.
gcbf
- Get handle to current callback figure.
drawnow
- Flush pending graphics events.
findobj
- Find objects with specified property values.
copyobj
- Make copy of graphics object and its children.
Hardcopy and
print
printopt
orient
Utilities,
closereq
newplot
ishandle
printing.
- Print graph or SIMULINK system; or save graph to M-file.
- Printer defaults,
- Set paper orientation.
Figure close recjuest function.
M-file preamble for NextPlot property.
True for graphics handles.
Menu utilities.
makemenu
- Create menu structure.
menubar
- Computer dependent default setting for MenuBar property.
umtoggle
- Toggle "checked" status of uimenu object.
winmenu
- Create submenu for "Window" menu item.
Toolbar button
btngroup
btnstate
btnpress
btndown
btnup
-
group utilities.
Create toolbar button group,
Query state of toolbar button group,
Button press manager for toolbar button group,
Depress button in toolbar button group,
Raise button in toolbar button group.
utilities.
- Get all object children.
- Hide/unhide GUI.
- Interactive editing of axes text objects.
- Get status text string in figure.
- Set status text string in figure.
- Get popup menu selection string.
- Transform figure objects' positions.
- Set figure pointer.
- Get figure pointer.
- Get handle of object the pointer is over.
Character
General.
char
double
cellstr
blanks
deblank
eval
strings.
-
String tests,
ischar
- True for
iscellstr
- True for
isletter
- True for
isspace
- True for
File
input/output.
Calendar.
Day of week.
End of month.
Date formatted tick labels.
Timing functions.
cputime
- CPU time in seconds,
tic, toe
- Stopwatch timer,
etime
- Elapsed time.
pause
- Wait in seconds.
programming functions.
Create object or return object class.
Convert object to structure array.
Display class method names.
True if object is a given class.
True for objects.
Inferior class relationship.
Superior class relationship.
Overloadable operators.
minus
- Overloadable
plus
- Overloadable
times
- Overloadable
mtimes
- Overloadable
mldivide
- Overloadable
nurdivide
- OverloacJable
rdivide
- OverloacJable
Idivide
- Overloadable
power
- Overloadable
mpower
- Overloadable
uminus
- Overloadable
uplus
- Overloadable
horzcat
- OverloacJable
vertcat
- Overloadable
le
- OverloacJable
It
- Overloadable
gt
- Overloadable
ge
- OverloacJable
- Overloadable
eq
- OverloacJable
ne
- Overloadable
not
and
- Overloadable
or
- Overloadable
subsasgn
- Overloadable
subsref
- Overloadable
colon
- Overloadable
transpose
- Overloadable
ctranspose
- Overloadable
subsindex
- Overloadable
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
for a-b.
for a+b.
for a.*b.
for a*b.
for a\b.
for a/b.
for a./b.
for a.\b.
for a.'b.
for a^b.
for -a.
for +a.
for [a b ] .
for [a;b].
for a<=b.
for a<b.
for a>b.
for a>=b.
for a==b.
for a~=b.
for -a.
for a&b.
for a|b.
for a(i)=b, a{i}=b, and a.field=b.
for a(i), a{i), and a.field.
for a:b.
for a.'
for a'
for x(a).
signal
Processing
Toolbox.
Waveform generation.
chirp
Swept-frecjuency cosine generator.
diric
Dirichlet (periodic sine) function.
gauspuls
Gaussian pulse generator.
pulstran
Pulse train generator.
rectpuls
Sampled aperiodic rectangle generator.
sawtooth
Sawtooth function.
sine
Sine or sin(pi*x)/(pi*x) function
scjuare
Scjuare wave function.
tripuls
Sampled aperiodic triangle generator.
Filter analysis1 and implementation.
abs
Magnitude.
angle
Phase angle.
easfilt
Cascade filter implementation.
conv
Convolution.
fftfilt
Overlap-add filter implementation.
filter
Filter implementation.
filtfilt
Zero-phase version of filter.
filtic
Determine filter initial conditions.
freqs
Laplace transform frecjuency response.
freqspace
Frecjuency spacing for frecjuency response.
freqz
Z-transform frecjuency response.
grpdelay
Group delay.
impz
Impulse response (discrete).
Lattice filter implementation.
latcfilt
Unwrap phase.
unwrap
upfirdn
Up sample, FIR filter, down sample.
zplane
Discrete pole-zero plot.
Linear system transformations,
eonvmtx
- Convolution matrix.
Iatc2tf
- Lattice or lattice ladder to transfer function conversion.
poly2rc
- Polynomial to reflection coefficients transformation.
rc2poly
- Reflection coefficients to polynomial transformation,
residuez
- Z-transform partial fraction expansion.
sos2ss
- Second-order sections to state-space conversion.
sos2tf
- Second-order sections to transfer function conversion.
sos2zp
- Second-order sections to zero-pole conversion.
ss2sos
- State-space to second-order sections conversion.
ss2tf
- State-space to transfer function conversion.
ss2zp
- State-space to zero-pole conversion.
tf21atc
- Transfer function to lattice or lattice ladder conversion.
tf2ss
- Transfer function to state-space conversion.
tf2zp
- Transfer function to zero-pole conversion.
zp2sos
- Zero-pole to second-order sections conversion.
zp2ss
- Zero-pole to state-space conversion.
zp2tf
- Zero-pole to transfer function conversion.
IIR digital filter design.
butter
- Butterworth filter design.
chebyl
- Chebyshev type I filter design.
cheby2
- Chebyshev type II filter design.
ellip
- Elliptic filter design.
maxflat
- Generalized Butterworth lov^ass filter design.
yulewalk
- Yule-Walker filter design.
IIR filter order selection.
buttord
- Butterworth filter order selection,
cheblord
- Chebyshev type I filter order selection.
cheb2ord
- Chebyshev type II filter order selection,
ellipord
- Elliptic filter order selection.
FIR filter design.
cremez
- Complex and nonlinear phase ecjuiripple FIR filter design.
firl
- Window based FIR filter design - low, high, band, stop, multi.
fir2
- Window based FIR filter design - arbitrary response.
fircls
- Constrained Least Squares filter design - arbitrary response.
firclsl
- Constrained Least Scjuares FIR filter design - low and highpass.
firls
- FIR filter design - arbitrary response with transition bands.
firrcos
- Raised cosine FIR filter design.
intfilt
- Interpolation FIR filter design.
kaiserord
- Window based filter order selection using Kaiser window.
remez
- Parks-McClellan optimal FIR filter design.
remezord
Transforms.
czt
det
dftmtx
fft
fftshift
hilbert
idct
ifft
Chirp-z transform.
Discrete cosine transform.
Discrete Fourier transform matrix.
Fast Fourier transform.
Swap vector halves.
Hilbert transform.
Inverse discrete cosine transform.
Inverse fast Fourier transform.
Windows.
bartlett
blacJanan
boxcar
chebwin
haituming
harming
kaiser
triang
Bartlett window.
Blackman window.
Rectangular window.
Chebyshev window.
Hamming window.
Harming window.
Kaiser window.
Triangular window.
Parcimetric modeling.
invfreqs
- Analog filter fit to frecjuency response.
invfreqz
- Discrete filter fit to frecjuency response.
levinson
- Levinson-Durbin recursion.
Ipc
- Linear Predictive Coefficients using autocorrelation method.
prony
- Prony's discrete filter fit to time response.
stmcb
- Steiglitz-McBride iteration for ARMA modeling.
ident
- See the System Identification Toolbox.
Specialized operations.
cceps
- Complex cepstrum.
decimate
- Resample data at a lower sample rate.
deconv
- Deconvolution.
demod
- Demodulation for communications simulation.
dpss
- Discrete prolate spheroidal secjuences (Slepian secjuences) .
dpssclear
- Remove discrete prolate spheroidal secjuences from database.
dpssdir
- Discrete prolate spheroidal secjuence database directory.
dpssload
- Load discrete prolate spheroidal secjuences from database.
dpsssave
- Save discrete prolate spheroidal secjuences in database.
interp
- Resample data at a higher sample rate.
interpl
- General 1-D interpolation. (MATLAB Toolbox)
medfiltl
- 1-Dimensional median filtering.
modulate
- Modulation for communications simulation.
rceps
- Real cepstrum and minimum phase reconstruction.
resample
- Resample secjuence with new sampling rate.
specgram
- Spectrogram, for speech signals.
spline
- Cubic spline interpolation.
vco
- Voltage controlled oscillator.
Analog lowpass
besselap
buttap
cheblap
cheb2ap
ellipap
-
filter prototypes.
Bessel filter prototype.
Butterworth filter prototype.
Chebyshev type I filter prototype (passband ripple).
Chebyshev ty[pe II filter prototype (stopband ripple).
Elliptic filter prototype.
Frecjuency translation.
Ip2bp
- Lowpass
Ip2bs
- Lov^ass
Ip2hp
- LovTpass
Ip21p
- Lowpass
to
to
to
to
Filter discretization.
bilinear
- Bilinear transformation with optional prewarping.
impinvar
- Impulse invariance analog to digital conversion.
other.
besself
conv2
cplxpair
detrend
fft2
fftshift
ifft2
polystab
stem
strips
xcorr2
Symbolic
Math
Toolbox.
Differentiate.
Integrate.
Limit.
Taylor series.
Jacobian matrix.
Summation of series.
Linear Algebra,
diag
triu
tril
inv
det
rank
rref
null
colspace
eig
svd
j ordan
poly
expm
Simplification,
simplify
expand
factor
collect
simple
numden
horner
subexpr
subs
Simplify.
Expand.
Factor.
Collect.
Search for shortest form.
Numerator and denominator.
Nested polynomial representation.
Rewrite in terms of subexpressions.
Symbolic substitution.
Solution of Ecjuations.
solve
- Symbolic solution of algebraic ecjuations.
dsolve
- Symbolic solution of differential ecjuations.
finverse
- Functional inverse,
compose
- Functional composition.
Variable Precision Arithmetic.
vpa
- Variable precision arithmetic,
digits
- Set variable precision accuracy.
Integral Transforms.
fourier
- Fourier transform,
laplace
- Laplace transform,
ztrans
- Z transform,
ifourier
- Inverse Fourier transform,
ilaplace
- Inverse Laplace transform,
iztrans
- Inverse Z transform.
Conversions.
double
poly2sym
sym2poly
char
Basic Operations,
Create symbolic object.
sym
Short-cut for constructing symbolic objects.
syms
findsym
Determine symbolic variables.
pretty
Pretty print a syitJaolic expression.
latex
LaTeX represention of a symbolic expression.
ccode
C code represention of a symbolic expression.
fortran
Fortran represention of a symbolic expression.
Special Functions.
sinint
- Sine integral,
cosint
- Cosine integral,
zeta
- Riemarm zeta function,
lambertw
- Leimbert W function.
String handling utilities.
isvarname
- Check for a valid variable neime.
vectorize
- Vectorize a symbolic expression.
9/6/00
5:23 IM
fixdivtyzero.m
Page 1 /
9/6/00 5:18 IM
blank.m
VagelL
9/6/00
5:17 EM
function r=rad(degrees)
% RAD converts degrees to radians
% r=RAD(degrees) returns the number in degrees
%
r=pi*degrees/180;
rad.m
E^ge \ / ^
9/6/00 5:17 EM
rad2c3eg.in
function d=rad2deg(radians)
% RAD2DEG converts radians to degrees
% d=RAD2DEG(radians) retums the number in degrees
%
d=180*radians/(2*pi);
Page l / j
9/6/00 5:18 !
dhangenenu.iti
E^ge l A
lastchoicel = old(1,4);
lastchoice2 = old(1,5);
lastchange=old(1,6);
new = old;
changeby = 0;
changeto = 0;
choice 1 = 0;
choice2 = lastchoice2;
';hoicelist{1} = 'Pick a parameter to change';
jhoicelist{2} = 'Repeat Last';
[r,c] = size(old);
num_elements = c-3;
for j=1:num_elements
choicelist{j+2} = char(names(1,j));
end
choicelist{num_elements-i-3} = 'Exit Program';
choicel = strmenu(choicelist);
% if choicel = 1 then repeat
% if choicel = (num_elements+2) then return lastchoicel =999 exit code
if choicel ==num_elements+2, new(1,num_elements+1)=999; return; end;
if choicel ~=1
choice2 = menu('Pick one:','Change to..','lncrease by..','Decrease by..');
end
if choice2 ==1
changeto = input('Change to : ');
)lse
if choicel ~=1 & choice2==2, changeby = input('lncrease by: '); end;
if choicel~=1 & choice2==3, changeby = input('Decrease by: '); end;
end
9/6/00
5:18 EM
chaiigeTienu.in
Page 2 A
end
end
9/6/00 5:17 IM
request .m
Page 1 / |
'];
if isempty(temp_value)
value = default_value;
return;
end
if nargin < 3
value = temp_value;
return;
end
if nargin == 3; maxv = inf; end;
if temp_value > maxv
value = maxv;
disp(['
WARNING, the requested number must be less than ',num2str(maxv)]);
disp(['
the value of this input has been set to ',num2str(maxv)]);
return;
end
if temp_value < minv
value = minv;
disp(['
WARNING, the requested number must be greater than ',num2str(minv)]);
disp(['
the value of this input has been set to ',num2str(minv)]);
return;
end
value = temp_value;
9/6/00
5:17 EM
strmenu.m
function k = strmenu(myinput);
%STRMENU Generate a menu of choices for user input (in fomri of cell array).
% K = MENU(cell_array) displays a menu with cell_array(1) as header
%
and cell_array(2), etc as choices
%
cell array should be a Ixn cell array
created as follows:
cell_array{1} = 'Choose a color'
cell_array{2} = '1) Red'
cell_array{3} = '1) Blue'
cell_array{4} = '1) Green'
will produce the following menu on the screen:
Choose a color
1)Red
2) Blue
3) Green
Select a menu number:
The number entered by the user in response to the prompt is
returned. On machines that support it, the local menu system
is used. The maximum number of menu items is 32.
See also MENU.
%
%
%
%
[myrows,mycols]=size(myinput);
myinput{33}='end';
sO=char(myinput(1));
s1=char(myinput(2));
if mycols>2 s2=char(myinput(3)); end;
if mycols>3 s3=char(myinput(4)); end;
if mycols>4 s4=char(myinput(5)); end;
if mycols>5 s5=char(myinput(6)); end;
if mycols>6 s6=char(myinput(7)); end;
if mycols>7 s7=char(myinput(8)); end;
if mycols>8 s8=char(myinput(9)); end;
if mycols>9 s9=char(myinput(10)); end;
if mycols>10 s10=char(myinput(11)
end;
if mycols>11 s11=char(myinput(12)
end;
'f mycols>12 si 2=char(myinput(13) end;
(f mycols>13 s13=char(myinput(14)
end;
if mycols>14 si 4=char(myinput(15) end;
if mycols>15 s i 5=char(myinput(16) end;
if mycols>16 s i 6=char(myinput(17) end;
E^ge 1/ii
9/6/00
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
f
5:1']' EM
mycols>17
mycols>18
mycols>19
mycols>20
mycols>21
mycols>22
mycois>23
mycols>24
mycols>25;
mycols>26;
mycols>27;
mycols>28;
mycols>29;
mycols>30;
mycols>31;
mycols>32;
s17=char(myinput(18))
s18=char(myinput(19))
s i 9=char(myinput(20))
s20=char(myinput(21))
s21=char(myinput(22))
s22=char(myinput(23))
s23=char(myinput(24))
s24=char(myinput(25))
s25=char(myinput(26))
s26=char(myinput(27))
s27=char(myinput(28))
s28=char(myinput(29))
s29=char(myinput(30))
s30=char(myinput(31))
s31 =char(myinput(32))
s32=char(myinput(33))
strmenu.m
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
c = computer;
display = 1;
PC = strcmp(c(1:2),'PC');
if -strcmp(c(1:2),'PC') & -strcmp(c(1:2),'MA')
% might be unix or VMS
if isunix
display = length(getenv('DISPLAY')) > 0;
else
display = length(getenv('DECW$DISPLAY')) > 0;
end
end
if -display
while 1,
dispC ')
clisp(['
',s0,'
'])
dispC ')
for n=1:(mycols-1)
disp(['
',int2str(n),') ',eval(['s',int2str(n)])])
end
dispC ')
k = input('Select a menu number: ');
if isempty(k), k = - 1 ; end;
if (k < 1) I (k > mycols - 1 ) 1 (~isreal(k)) I (isnan(k)) I isinf(k),
dispC ')
dispCSelection out of range. Try again.')
else
return
end
end
end
kids = get(0,'Children');
if ~isempty(kids)
otherfig = gcf;
M=get(otherfig,'Colormap');
else
Page 2 L
9/6/00 5:17 EM
st:ntenu.m
M=get(0,'DefaultFigureColormap');
end
xedge = 30;
yedge = 35;
ybord = 30;
width = 30;
avwidth = 7; % actually 6.8886 -i-/- 0.4887
height = 30;
imax = 1;
maxlen = length(sO);
for i = 1:mycols-1
mx = Iength(eval(['s',int2str(i)]));
if mx > maxlen
maxlen = mx;
imax = i;
end
end
twidth = 1.2*maxlen*avwidth;
% now figure out total dimensions needed so things can get placed in pixels
mwwidth = twidth + width + 2*xedge;
mwheight = (mycols-i-1)*yedge;
ss = get(0,'ScreenSize');
swidth = ss(3); sheight = ss(4);
%left = (swidth-mwwidth)/2;
eft = 20;
bottom = sheight-mwheight-ybord;
rect = [left bottom mwwidth mwheight];
fig = figure('units','pixels','Position',rect,'number','off,'name',' ', ...
'resize','off','Colormap',M);
set(gca,'units','normalized','Position',[0 0 1 1]); axis off;
% Place title
t = text(mwwidth/2,mwheight-yedge/2,s0,'Horizontal','center',...
'Vertical','top','units','pixels');
for ii=(mycols-1):-1:1
i = mycols - ii;
hi = uicontrol('units','pixels','position', ...
[xedge (i-.5)*yedge width+twidth height]);
set(h1,'callback',['set(gcf,"userdata",',int2str(ii),')']);
set(h1,'string',['
', eval(['s',int2str(ii)])])
set(h1,'HorizontalAlignment','left');
% left justify string inside button
end
waitfor(gcf,'userdata')
k = get(gcf,'userdata');
delete(fig)
if ~isempty(kids)
ch = get(0,'children');
if ~isempty(ch),
if ~isempty(find(ch == otherfig)), % Make sure figure is there
if strcmp(get(otherfig,'Visible'),'on')
set(0,'CurrentFigure',otherfig);
end
Page 3/j
9/6/00 5:17 EM
end
end
end
st:nnenu.m
E^ge 4 ^
9/6/00
5:19 EM
WBMsfonn.m
Page 1 / ^
function w = waveform(frequencies,amplitudes, c e n t e r s , s t a r t p , e n d p , p s t e p , i n d e x )
% WAVEFORM p r o d u c e s t h e s h a p e of a d i s p e r s e d w a v e p a c k e t
%w =
waveform(frequencies,amplitudes,centers,start_pos,end_pos,pos_step_size)
%
returns a 2 x [ (endj)OS-start_pos)/po_step_size]
%
array of positions and interfered amplitudes based on an input of
%
frequencies, their amplitudes, and their centers (phase information)
%
the desired start,end and
%
(each input is a 1 x n array)
%
9/6/00
5:20 EM
testnatirix.m
%testmatrix.m
% this program simply generates some usable test matrices
cell array =
{ 'm'
'P'
'1'
'i'
c'
3
5
8
,
1.5
r 1.5
,
,
,
,
,
0
0 <
0 <
1.4
1.4 r
0
0
0
0
3 }
Page l/j
9/6/00 5:20 EM
stablecavity.m
Page 1 /
function qo=stablecavity(roundtrip_ABCD_matrix)
% STABLECAVITY retums the q_parameter for a standing wave in a cavity given the ABCD matrix
%
qo = STABLECAVITY(roundtrip_ABCD_matrix) yields an imaginary number output for a 2x2 matrix
input
%
for a round trip in the cavity.
%
calculation is based on assumption that the q-parameter will be unchanged after a roundtrip
% THIS PROGRAM ASSUMES AN EMPTY CAVITY WITH NO LASER ROD
% written by Phil Tsai 11-03-99
%
last revision 11-04-99
RTA
RTB
RTC
RTD
=
=
=
=
roundtrip,ABCD_matrix(1,1)
roundtrip_ABCD_matrix(1,2)
roundtrip_ABCD_matrix(2,1)
roundtripABCD_matrix(2,2)
9/6/00 5:20 EM
spotsize.m
Page \ /
9/6/00
5:21 EM
qparam.m
termi = 1/radius;
term2 = wavelength / (pi*index*spotsize'^2);
q = 1/ (termi - i * term2);
E^ge l /
CL
9/6/00
5:21 IM
cptics.m
if
if
if
if
Page 1 /
'H.
9/6/00 5:23 IM
beamdivergence.m
Page lA
% beamdivergence.m outputs the beam divergences for a given spot size and a range of radii of curvature
%
/o written by Phil Tsai 11-10-99
%
last revision 11-10-99
%
spot = request('Enter half-diameter spotsize(in mm) at output of laser',0.35);
start_radius = request('Enter starting radius of curvature (in mm)',spot*1000);
stop_radius = request('Enter stopping radius of curvature (in mm)',spot*2000);
step_size = request('Enter step size of radius (in mm)',spot*10);
distance = request('Enter distance(in mm) over which to evaluate beam', 10);
wavelength = request('Enter wavelength of laser (IN NANOMETERS)',800);
wavelength = wavelength/1 e6;
index = request('Enter index of propagation medium',1);
clear divergence;
count = 1;
for r = start_radius:step_size:stop_radius;
termi = 1/r;
term2 = -i*wavelength/(pi*index*spot^2);
qo = 1/(term1+term2);
q1 = qo + distance;
temp = -1*imag(1/q1);
spot2 = 1/(sqrt(temp*pi*index/wavelength));
y = spot2-spot;
angle = atan(y/distance);
divergence(1,count) = r;
divergence(2,count) = angle*1000;
count=count+1;
end
plot(divergence(1,:),divergence(2,:))
xlabel('radius of curvature (in mm) at laser output');
ylabel('half-angle beam divergence at laser output in milliradians');
grid;
9/6/00 5:21 IM
roundtripabcd.m
Pagel/^
celLarray =
{'m' , 3 ,
'p'
'I'
'i'
0 , 0
<- mirror of radius of curvature = -i-3
, 5 , 0 , 0
<- propagation through distance = 5
, 8 , 0 , 0
<- lens of focal length +8
, 1.5 , 1.4 , 0
<- planar interface between n=1.5 & n=1.4
1.5 , 1.4 , 3 }
<- spherical interface between n=1.5 & n=1.4
and radius of curvature = 3
o>
Vo
ROUNDTRIP=eye(2);
for j = 1 : 2*num_matrices - 2;
9/6/00
5:21 IM
roundtripabcd.m
end; R0UNDTRIP=R0UNDTRIP*ABCD(:.:,j);
rt = ROUNDTRIP;
ifnargout==2,indiv = ABCD; end
" ^
9/6/00
5:22 EM
cptic.m
Page 1 ^
if nargin == 0,
blank(2);
dispCOPTIC function returns the ABCD ray matrix for an optical element')
disp('OPTIC displays instructions for the function')
disp('OPTIC("lens",focal_length) returns matrix for a lens of stated focal length')
disp('OPTIC("mirror",radius) returns matrix for a mirror of stated radius of curvature')
dispC
(positive radius = center of curvature on incident side)')
disp('OPTIC("go",distance) returns matrix for propagation of stated distance')
disp(' OPTIC("prop",distance) returns matrix for propagation stated distance')
disp{' OPTIC("travel",distance) returns matrix for propagation stated distance')
disp('OPTIC("interface",n1,n2) returns matrix for planar interface indices n1 to n2')
disp('OPTIC("cinterface",incident_index,transmitted_index,radius) returns matrix for a spherical
interface')
dispC
OPTIC("sinterface",incident_index,transmitted_index,radius) returns matrix for a
spherical interface')
dispC
(positive radius = center of curvature on incident side)')
blank(2);
else
switch type
case {'lens'.'len','!'}
M=[1 , 0 ; -1/param1 , 1];
case {'mirror','miror','m'}
M=[1 , 0 ; -2/param1 , 1];
case {'go','prop','travel','p','g','t'}
M=[1 , parami ; 0 , 1 ] ;
case {'interface','inter','!'}
M=[1 , 0 ; 0 , parami/param2];
case {'cinterface','sinterface','cinter','sinter'}
M=[1 , 0 ; (param2-param1)/(param2*param3) , parami/param2];
otherwise
blank(2)
dispCError in input: type "optic" for instruction');
9/6/00
5:22 EM
cptic.m
end
end
blank(2)
M=2eros(2);
I^ge 2 /
^^
9/6/00
5:22 EM
gaussianbeam.m
% gaussianbeam.m plots the gaussian spotsize as a function of distance for a given optical train
%
/o written by Phil Tsai 11-10-99
%
last revision 11-10-99
Page l A
9/6/00 5:22 EM
gaussianbeam.m
count=count-i-1;
position(count)= position(count-1)+stepsize;
q(count)=q(count-1 )+stepsize;
[spot(count),radius(count)] = spotsize(q(count),lamda,index);
end
plot(position(:),spot(:));
xlabel('position in mm');
ylabel('spotsize (half-diameter)');
grid;
for j = 1:num_optics
va!uearray(1,2*j-1) = distance(j);
va!uearray(1,2*j) = element(j);
namearray{1,2*j-1} = ['Distance to Mirror #',int2str(j)];
namearray{1,2*j} = ['Focal Length of Mirror #',int2str(j)];
end;
valuearray(1,2*num_optics-h1) = distance(num_optics-t-1);
namearray{1,2*num_optics-Hl} = 'Distance to end';
valuearray = changemenu(namearray,valuearray);
if valuearray(1,2*num_optics+2) == 999; break;
end;
for j = 1:num_optics
distance(j) = valuearray(1,2*j-1);
e!ement(j) = valuearray(1,2*j);
end;
distance(num_optics-Hl) = va!uearray(1,2*num_optics-h1);
disp(valuearray(1,1:2*num_optics-Hl));
end;
Page 2 ^ ^
9/6/00
5:23 IM
enpt^ycavit^.m
% emptycavity.m program calculates the spot size in an empty cavity with n mirrors
% this program assumes no laser rod material
% written by Phil Tsai 11-02-99
%
last revision 11-05-99
Oi
blank(3);
disp('M1 = output coupler; other mirrors sequentially follow beam path from Ml')
blank
disp('Enter 0 for Plane Mirrors')
blank(2)
% first ask user out how many mirrors are in the cavity
num_mirrors_default_value = 5;
num_mirrors = request('How many mirrors in the cavity',num_mirrors_default_value);
Page l / .
9/6/00
5:23 IM
distance(j) =
atptycavity.m
request(prompt_str,distance_default_value(j));
md
wavelength = request('Enter wavelength IN NANOMETERS',wavelength_default_value);
wavelength = wavelength/1 eS;
%convert nanometers to mm
blank
disp('Please wait...');
blank
%here is the part of the program that loops upon changes to parameters
while 0==0;
"/Vo of course, planar mirrors have a radius of curvature of infinity, not zero
%
so, we fix that here
for j = 1:num_mirrors
if radius_curv(j) == 0 ; radius_curv(j) = inf ; end;
end
% create a cell array that contains the sequence of mirrors and propagations
%
through the laser cavity; use this celLarray as input for the
%
home-made function ROUNDTRIPABCD to generate ABCD matrices and
%
total matrix for a round trip through the cavity, starting at Ml
or j = 1 : 2 : 2*(num_mirrors - 1)
cell_array(j,:) =
{'m',radius_curv((j+1)/2),0,0};
cell_array(j-(-1,:) = {'p',distance((j+1)/2),0,0};
end
cell_array(2*num_mirrors-1,:) = {'m',radius_curv(num_mirrors),0,0};
% call home-made functions ROUNDTRIPABCD and STABLECAVITY
%
STABLECAVITY gives the standing wave q-parameter at mirrorl
[ROUNDTRIP,ABCD] = roundtripabcd(cell_array);
q(1) = stablecavity(ROUNDTRIP);
position(l) = 0;
% Now, step through the cavity and record the q-parameter as a function
%
of position, by dividing each segment into discrete steps
counter=1;
for j=1:num_mirrors-1
stepsize=distance(j)/step_resolution;
for k=stepsize:stepsize:distance(j)
counter=counter-Hl;
position(counter)=position(counter-1)-i-stepsize;
q(counter)=q(counter-1)-i-stepsize;
end
MA=ABCD(1,1,2*j-f1);
MB=ABCD(1,2,2*j-i-1);
MC=ABCD(2,1,2*j-Hl);
Page 2 L
9/6/00
5:23 EM
orptycavity.m
MD=ABCD(2,2,2*j-Hl);
q(counter)=(MA*q(counter)-KMB)/(MC*q(counter)-i-MD);
end
for
j=num_mirrors-1:-1:1
stepsize=distance(j)/step_resolution;
for k=stepsize:stepsize:distance(j)
counter=counter-Hl;
position(counter)=position(counter-1)-i-stepsize;
q(counter)=q(counter-1)-(-stepsize;
end
MA=ABCD(1,1,2*j-1);
MB=ABCD(1,2,2*j-1);
MC=ABCD(2,1,2*j-1);
MD=ABCD(2,2,2*j-1);
q(counter)=(MA*q(counter)-i-MB)/(MC*q(counter)-HMD);
end
num_steps = counter;
% This section allows the user to adjust the parameters and replot
%
the spotsize with the new parameters
choicelist{1} = 'Pick a parameter to change';
choicelist{2} = 'Repeat Last';
for
j=1:num_mirrors-1
choicelist{j-i-2} = strcat('Radius of M',int2str(j));
choicelist{j-i-num_mirrors-H2} = strcat('Distance M',int2str(j),...
' -> M',int2str(j+1));
end
choicelist{num_mirrors-i-2} = strcat('Radius of
choicelist{2*num_mirrors-(-2} = 'Exit Program';
choicel = strmenu(choicelist);
M',int2str(num_mirrors));
Page 3/u
9/6/00
%
%
%
%
%
5:23 EM
enptycavity.m
Page 4/t,
9/6/00 5:29 IM
cpirdfix.m
function n=opindex(material_name,wavelength)
% OPINDEX gives the index of refraction at a particular wavelength for a variety of materials
%
n=OPINDEX(materiaLname,wavelength) inputs the materiaLname as a string
%
and the desired wavelength (in NANOMETERS), and outputs the index of refraction
%
OPINDEX with no parameters shows a list of available material names
70
%
Vo
%
Page l/^
9/6/00 5:29 m
qpindex.m
E^ge 2/_
case 3
n=sqrt(p(1)-)-p(2)*x'^2 + p(3)/x'^2 + p(4)/x'^4-fp(5)/x'^6+p(6)/x'^8);
case 4
n = sqrt(1-^p(1)*x'^2/(x^2-p(2)^2)-^p(3)*x'^2/(x'^2-p(4)A2)-^p(5)*x^2/(x'^2-p(6)'^2));
case 13
n=sqrt(1 + {x^2) * (p(1) / (xA2-p(2)) + p(3)/(xA2-p(4)) + p(5) / (x-p(6))));
end