Glossary for Multivariable Calculus with MATLAB

by Ronald L. Lipsman and Jonathan M. Rosenberg

Springer, 2017

This web page contains a list of MATLAB commands and options which you may find useful in working on topics and problems in the book. The descriptions of the comands are purposely kept very short. Except when stated, all commands are part of MATLAB itself or the Symbolic Math Toolbox (for symbolic operations). For more information on the commands, see the MATLAB documentation. Better still, download the attached Live Script and run or modify the sample commands in it to see what the various commands do.

MATLAB Punctuation

@
Creates a function handle or anonymous function
&
Logical AND operator
|
Logical OR operator
~
Logical NOT operator
=
Assignment operator
==
Operator for representing a symbolic equation
%
Introduces a comment (not to be executed)
:
Range operator
,
Separates commands without suppressing output
;
Suppresses output and can also be used to separate commands
'
Used to deliminate a string
+
Addition operator, works on vectors also
-
Subtraction operator, works on vectors also
*
Multiplication operator
.*
Vectorized multiplication operator
/
Division operator
./
Vectorized division operator
^
Exponentiation operator
.^
Vectorized exponentiation operator
.
Decimal point, also operator for accessing fields of a structure array
...
Line continuation operator (used to split a command over more than one line)

MATLAB Constants

pi
π
i
The imaginary unit, if not overwritten by a variable name
inf

MATLAB Commands

abs
The absolute value function
acos
The inverse cosine function
asin
The inverse sine function
assume
Set assumptions on a symbolic variable (e.g., real, positive, integer)
atan
The inverse tangent function
atan2
Finds the polar coordinate θ in terms of y and x
axis
Selects the ranges of x and y (also z if a 3D plot) to show in a plot
clear
Clears values and definitions for variables and functions. If you specify one or more variables, then only those variables are cleared.
conj
Complex conjugation
copyobj
Copy a graphics object
cos
The cosine function
cosh
The hyperbolic cosine function (ex + e-x)/2
cross
The cross product of two vectors
curl
The curl of a vector field
det
Computes the determinant of a square matrix
diff
Computes the derivative
disp
Displays the value of a variable or string. Useful for formatting output
divergence
The divergence of a vector field
dot
The dot product of two vectors
double
Converts the (possibly symbolic) expression for a number to a numerical (double-precision) value
dsolve
Symbolic differential equation solver
edit
Opens a script in the Editor
eig
Computes the eigenvalues of a square matrix
erf
The error function (integral of a Gaussian)
exp
The exponential function ex
ezpolar
Easy plotter in polar coordinates
fcontour
Plots the contour curves of a symbolic expression f(x,y)
figure
Start a new graphic
fimplicit
Produces a plot of an implicit equation f(x,y)=0
fimplicit3
Plots a contour surface of a symbolic expression f(x,y,z)
fmesh
Easy 3D mesh surface plotter
fminbnd
Find minimum of single-variable function on fixed interval
fminsearch
Searches numerically for a minimum of a function of a single (possibly vector) variable
fminunc
In the Optimization Toolbox. Searches for an unconstrained minimum of a function of several variables
format
Changes the format for displaying numbers
fplot
Easy function plotter
fplot3
Easy 3D plotter for curves in 3-space
fsurf
Easy 3D surface plotter
fzero
Finds (numerically) a zero of a function near a given starting value
gca
Get current axes
gcf
Get current figure
heaviside
A step function that is +1 for x > 0 and 0 for x < 0
hold on
Retain current figure; combine new graph with previous one
hold off
Returns to the default where new figures overwrite old ones
int
Computes the integral (symbolically)
integral
Integrates numerically
integral2
Computes a numerical integral in two variables
integral3
Computes a numerical integral in three variables
jacobian
Finds the gradient of a function of several variables. When applied to the symbolic expression for the gradient, can be used to compute the Hessian
laplacian
Computes the Laplacian of a scalar field
legend
Attaches a legend to a combination of plots
length
Gets the dimension (number of entries) of a vector
limit
Computes the limit
linspace
Generates a linearly spaced vector
log
The natural logarithm
loglog
Log-log plotter
logspace
Generates a logarithmically spaced vector
matlabFunction
Converts a symbolic expression to a vectorized numerical function
max
Computes the maximum of the entries of a vector
meshgrid
Returns grid coordinates. Needed for quiver
min
Computes the minimum of the entries of a vector
norm
Norm of a vector or matrix
ode45
Numerical differential equation solver
odeset
Sets options for ode45
ones
Creates a matrix of all ones
plot
Basic plotting command for numerical data
plot3
Basic plotting command in 3D for numerical data
polarplot
Plots a curve in polar coordinates
potential
Computes a potential for a conservative vector field
pretty
Displays a symbolic expression in mathematical style
quiver
Plots vector field based on grid coordinates supplied by meshgrid
rand
Generates a matrix of uniformly distributed random numbers
real
Follows syms to insure variables are real. Also gets the real part of a complex number
series
Computes a series expansion
simplify
Used to simplify a symbolic expression
sin
The sine function
sinh
The hyperbolic sine function (ex - e-x)/2
size
Gets the dimensions of a matrix
solve
Symbolic equation solver
sqrt
Square root function
struct
Creates a structure array
subs
Substitute for a variable in an expression
syms
Set up one or more symbolic variables
symsum
Finds the (symbolic) sum of a series
tan
The tangent function
tanh
The hyperbolic tangent function (ex - e-x)/(ex + e-x)
taylor
Computes the Taylor polynomial; use the optional argument Order to reset the order. Compare series, which is similar but allows expansions involving negative and fractional exponents.
title
Puts a title on a figure
trace
Sum of the diagonal elements of a matrix
transpose
Computes the transpose of a symbolic matrix
vectorPotential
Computes a vector potential for a divergence-free vector field
view
Specifies a point from which to view a 3D graph
vpasolve
Finds numerical solutions to symbolic equations
zeros
Creates a matrix of all zeros

Options to MATLAB Commands

AbsTol, RelTol
Control error tolerances in numerical commands like integral or ode45
LevelList
Specifies the contour levels for fcontour
LineColor
Specifies color of curves in a graph
LineWidth
Controls thickness of curves or contours in a graph
MarkerSize
Controls size of points in a graph
MaxDegree
An option to solve, giving the maximum degree of polynomials for which MATLAB will try to find explicit solution formulas
MaxFunEvals
Sets maximum number of function evaluations allowed in a computation or process
Order
An option to taylor and series, specifying the number of terms to take in the series
Steps
An option to simplify, specifying the number of simplification steps to try
WayPoints
Specifies specific points for evaluation of the function in integral