You are on page 1of 11

04/06/2020 Symbolic Math Toolbox — Functions

Symbolic Math Toolbox — Functions

By Category Alphabetical List

Symbolic Computations in MATLAB

Symbolic Variables, Expressions, Functions, and Preferences


sym Create symbolic variables, expressions, functions, matrices

syms Create symbolic variables and functions

symfun Create symbolic functions

str2sym Evaluate string representing symbolic expression

fold Combine (fold) vector using function

piecewise Conditionally defined expression or function

symvar Find symbolic variables in symbolic input

argnames Input variables of symbolic function

formula Return body of symbolic function

has Check if expression contains particular subexpression

children Subexpressions or terms of symbolic expression

symType Determine type of symbolic object

symFunType Determine functional type of symbolic object

isSymType Determine whether symbolic object is specific type

hasSymType Determine whether symbolic object contains specific type

findSymType Find symbolic subobjects of specific type

mapSymType Apply function to symbolic subobjects of specific type

isfinite Check whether symbolic array elements are finite

isinf Check whether symbolic array elements are infinite

isnan Check whether symbolic array elements are NaNs

sympref Set symbolic preferences

Operators and Elementary Operations


minus Symbolic subtraction

plus Symbolic addition

times Symbolic array multiplication

ldivide Symbolic array left division

rdivide Symbolic array right division

power Symbolic array power

nthroot Nth root of symbolic numbers

mtimes Symbolic matrix multiplication

mldivide Symbolic matrix left division

mrdivide Symbolic matrix right division

mpower Symbolic matrix power

transpose Symbolic matrix transpose

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 1/11
04/06/2020 Symbolic Math Toolbox — Functions

ctranspose Symbolic matrix complex conjugate transpose

eq Define symbolic equation

ge Define greater than or equal to condition

gt Define greater than relation

le Define less than or equal to condition

lt Define less than relation

ne Define inequality

has Check if expression contains particular subexpression

in Numeric type of symbolic input

isequal Test equality of symbolic inputs

isequaln Test symbolic objects for equality, treating NaN values as equal

piecewise Conditionally defined expression or function

and Logical AND for symbolic expressions

not Logical NOT for symbolic expressions

or Logical OR for symbolic expressions

xor Logical XOR for symbolic expressions

all Test whether all equations and inequalities represented as elements of symbolic array
are valid

any Test whether at least one of equations and inequalities represented as elements of
symbolic array is valid

has Check if expression contains particular subexpression

in Numeric type of symbolic input

isequaln Test symbolic objects for equality, treating NaN values as equal

isfinite Check whether symbolic array elements are finite

isinf Check whether symbolic array elements are infinite

isnan Check whether symbolic array elements are NaNs

logical Check validity of equation or inequality

symtrue Symbolic logical constant true

symfalse Symbolic logical constant false

mod Symbolic modulus after division

powermod Modular exponentiation

quorem Quotient and remainder

rem Remainder after division

conj Complex conjugate of symbolic input

imag Imaginary part of complex number

real Real part of complex number

Conversion Between Symbolic and Numeric


cell2sym Convert cell array to symbolic array

double Convert symbolic values to MATLAB double precision

poly2sym Create symbolic polynomial from vector of coefficients

sym Create symbolic variables, expressions, functions, matrices

sym2cell Convert symbolic array to cell array

sym2poly Extract vector of all numeric coefficients, including zeros, from symbolic polynomial

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 2/11
04/06/2020 Symbolic Math Toolbox — Functions

symfun Create symbolic functions

vpa Variable-precision arithmetic (arbitrary-precision arithmetic)

Units of Measurement
checkUnits Check for compatible dimensions and consistent units

findUnits Find units in input

isUnit Determine if input is a symbolic unit

mixedUnits Split unit into sum of units

newUnit Define new unit

removeUnit Remove unit

rewrite Rewrite expression in terms of another function

separateUnits Separate units from expression

simplify Algebraic simplification

str2symunit Convert character vector or string to unit

symunit Units of measurement

symunit2str Convert unit to character vector

unitConversionFactor Conversion factor between units

unitConvert Convert units to other units of measurement

unitInfo Information on units of measurement

baseUnits Base units of unit system

derivedUnits Derived units of unit system

newUnitSystem Define unit system

removeUnitSystem Remove unit system

unitSystems List available unit systems

Mathematics

Equation Solving
equationsToMatrix Convert linear equations to matrix form

eliminate Eliminate variables from rational equations

finverse Functional inverse

linsolve Solve linear equations in matrix form

poles Poles of expression or function

solve Equations and systems solver

vpasolve Solve equations numerically

dsolve Solve system of differential equations

massMatrixForm Extract mass matrix and right side of semilinear system of differential algebraic
equations

odeFunction Convert symbolic expressions to function handle for ODE solvers

odeToVectorField Reduce order of differential equations to first-order

daeFunction Convert system of differential algebraic equations to MATLAB function handle suitable
for ode15i

decic Find consistent initial conditions for first-order implicit ODE system with algebraic
constraints

findDecoupledBlocks Search for decoupled blocks in systems of equations

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 3/11
04/06/2020 Symbolic Math Toolbox — Functions

incidenceMatrix Find incidence matrix of system of equations

isLowIndexDAE Check if differential index of system of equations is lower than 2

massMatrixForm Extract mass matrix and right side of semilinear system of differential algebraic
equations

odeFunction Convert symbolic expressions to function handle for ODE solvers

reduceDAEIndex Convert system of first-order differential algebraic equations to equivalent system of


differential index 1

reduceDAEToODE Convert system of first-order semilinear differential algebraic equations to equivalent


system of differential index 0

reduceDifferentialOrder Reduce system of higher-order differential equations to equivalent system of first-order


differential equations

reduceRedundancies Simplify system of first-order differential algebraic equations by eliminating redundant


equations and variables

Formula Manipulation and Simplification


simplify Algebraic simplification

simplifyFraction Simplify symbolic rational expressions

subexpr Rewrite symbolic expression in terms of common subexpressions

coeffs Coefficients of polynomial

expand Expand expressions and simplify inputs of functions by using identities

horner Horner nested polynomial representation

numden Extract numerator and denominator

partfrac Partial fraction decomposition

children Subexpressions or terms of symbolic expression

collect Collect coefficients

combine Combine terms of identical algebraic structure

compose Functional composition

displayFormula Display symbolic formula from string

divisors Divisors of integer or expression

factor Factorization

isolate Isolate variable or expression in equation

lhs Left side (LHS) of equation

rewrite Rewrite expression in terms of another function

rhs Right side (RHS) of equation

subexpr Rewrite symbolic expression in terms of common subexpressions

subs Symbolic substitution

Calculus
limit Limit of symbolic expression

diff Differentiate symbolic expression or function

functionalDerivative Functional derivative

int Definite and indefinite integrals

vpaintegral Numerical integration using variable precision

changeIntegrationVariable Integration by substitution

integrateByParts Integration by parts

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 4/11
04/06/2020 Symbolic Math Toolbox — Functions

release Evaluate integrals

curl Curl of vector field

divergence Divergence of vector field

gradient Gradient vector of scalar function

hessian Hessian matrix of scalar function

jacobian Jacobian matrix

laplacian Laplacian of scalar function

potential Potential of vector field

vectorPotential Vector potential of vector field

pade Pade approximant

rsums Interactive evaluation of Riemann sums

series Puiseux series

taylor Taylor series

cumprod Symbolic cumulative product

cumsum Symbolic cumulative sum

symprod Product of series

symsum Sum of series

fourier Fourier transform

ifourier Inverse Fourier transform

htrans Hilbert transform

ihtrans Inverse Hilbert transform

laplace Laplace transform

ilaplace Inverse Laplace transform

ztrans Z-transform

iztrans Inverse Z-transform

sympref Set symbolic preferences

rsums Interactive evaluation of Riemann sums

taylortool Taylor series calculator

Linear Algebra
cat Concatenate symbolic arrays along specified dimension

colon Create symbolic vectors, array subscripting, and for-loop iterators

horzcat Concatenate symbolic arrays horizontally

sort Sort elements of symbolic vectors or matrices

vertcat Concatenate symbolic arrays vertically

diag Create diagonal matrix or get diagonals from symbolic matrices

reshape Reshape symbolic array

tril Return lower triangular part of symbolic matrix

triu Return upper triangular part of symbolic matrix

adjoint Classical adjoint (adjugate) of square matrix

cond Condition number of matrix

det Determinant of symbolic matrix

equationsToMatrix Convert linear equations to matrix form

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 5/11
04/06/2020 Symbolic Math Toolbox — Functions

inv Inverse of symbolic matrix

linsolve Solve linear equations in matrix form

norm Norm of matrix or vector

pinv Moore-Penrose inverse (pseudoinverse) of symbolic matrix

rank Find rank of symbolic matrix

rref Reduced row echelon form of matrix (Gauss-Jordan elimination)

colspace Basis for column space of matrix

null Form basis for null space of matrix

orth Orthonormal basis for range of symbolic matrix

chol Cholesky factorization

lu LU factorization

qr QR factorization

svd Singular value decomposition of symbolic matrix

charpoly Characteristic polynomial of matrix

eig Eigenvalues and eigenvectors of symbolic matrix

jordan Jordan normal form (Jordan canonical form)

curl Curl of vector field

divergence Divergence of vector field

gradient Gradient vector of scalar function

hessian Hessian matrix of scalar function

jacobian Jacobian matrix

laplacian Laplacian of scalar function

potential Potential of vector field

vectorPotential Vector potential of vector field

hermiteForm Hermite form of matrix

jordan Jordan normal form (Jordan canonical form)

smithForm Smith form of matrix

bernsteinMatrix Bernstein matrix

toeplitz Symbolic Toeplitz matrix

expm Matrix exponential

funm General matrix function

logm Matrix logarithm

sqrtm Matrix square root

Assumptions
assume Set assumption on symbolic object

assumeAlso Add assumption on symbolic object

assumptions Show assumptions affecting symbolic variable, expression, or function

in Numeric type of symbolic input

piecewise Conditionally defined expression or function

isAlways Check whether equation or inequality holds for all values of its variables

logical Check validity of equation or inequality

Polynomials
https://www.mathworks.com/help/symbolic/referencelist.html?type=function 6/11
04/06/2020 Symbolic Math Toolbox — Functions

coeffs Coefficients of polynomial

gbasis Reduced Groebner basis

poly2sym Create symbolic polynomial from vector of coefficients

polynomialDegree Degree of polynomial

polynomialReduce Reduce polynomials by division

resultant Resultant of two polynomials

root Represent roots of polynomial

sym2poly Extract vector of all numeric coefficients, including zeros, from symbolic polynomial

charpoly Characteristic polynomial of matrix

minpoly Minimal polynomial of matrix

bernstein Bernstein polynomials

chebyshevT Chebyshev polynomials of the first kind

chebyshevU Chebyshev polynomials of the second kind

gegenbauerC Gegenbauer polynomials

hermiteH Hermite polynomials

jacobiP Jacobi polynomials

laguerreL Generalized Laguerre Function and Laguerre Polynomials

legendreP Legendre polynomials

Mathematical Functions
catalan Catalan constant

eulergamma Euler-Mascheroni constant

log Natural logarithm of entries of symbolic matrix

log10 Log base 10 of symbolic input

log2 Log base 2 of symbolic input

dilog Dilogarithm function

hurwitzZeta Hurwitz zeta function

polylog Polylogarithm

psi Digamma function

zeta Riemann zeta function

sin Symbolic sine function

sinc Normalized sinc function

cos Symbolic cosine function

tan Symbolic tangent function

cot Symbolic cotangent function

sec Symbolic secant function

csc Symbolic cosecant function

asin Symbolic inverse sine function

acos Symbolic inverse cosine function

atan Symbolic inverse tangent function

acot Symbolic inverse cotangent function

asec Symbolic inverse secant function

acsc Symbolic inverse cosecant function

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 7/11
04/06/2020 Symbolic Math Toolbox — Functions

sinh Symbolic hyperbolic sine function

cosh Symbolic hyperbolic cosine function

tanh Symbolic hyperbolic tangent function

coth Symbolic hyperbolic cotangent function

sech Symbolic hyperbolic secant function

csch Symbolic hyperbolic cosecant function

asinh Symbolic inverse hyperbolic sine function

acosh Symbolic inverse hyperbolic cosine function

atanh Symbolic inverse hyperbolic tangent function

acoth Symbolic inverse hyperbolic cotangent function

asech Symbolic inverse hyperbolic secant function

acsch Symbolic inverse hyperbolic cosecant function

abs Symbolic absolute value (complex modulus or magnitude)

angle Symbolic polar angle

atan2 Symbolic four-quadrant inverse tangent

imag Imaginary part of complex number

real Real part of complex number

sign Sign of real or complex value

signIm Sign of the imaginary part of complex number

beta Beta function

factorial Factorial of symbolic input

gamma Gamma function

gammaln Logarithmic gamma function

igamma Incomplete gamma function

nchoosek Binomial coefficient

pochhammer Pochhammer symbol

dawson Dawson integral

erf Error function

erfc Complementary error function

erfcinv Inverse complementary error function

erfi Imaginary error function

erfinv Inverse error function

fresnelc Fresnel cosine integral function

fresnels Fresnel sine integral function

coshint Hyperbolic cosine integral function

cosint Cosine integral function

ei One-argument exponential integral function

expint Exponential integral function

eulergamma Euler-Mascheroni constant

logint Logarithmic integral function

sinhint Hyperbolic sine integral function

sinint Sine integral function

ssinint Shifted sine integral function

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 8/11
04/06/2020 Symbolic Math Toolbox — Functions

ellipke Complete elliptic integrals of the first and second kinds

ellipticCE Complementary complete elliptic integral of the second kind

ellipticCK Complementary complete elliptic integral of the first kind

ellipticCPi Complementary complete elliptic integral of the third kind

ellipticE Complete and incomplete elliptic integrals of the second kind

ellipticF Incomplete elliptic integral of the first kind

ellipticK Complete elliptic integral of the first kind

ellipticNome Elliptic nome function

ellipticPi Complete and incomplete elliptic integrals of the third kind

jacobiAM Jacobi amplitude function

jacobiCD Jacobi CD elliptic function

jacobiCN Jacobi CN elliptic function

jacobiCS Jacobi CS elliptic function

jacobiDC Jacobi DC elliptic function

jacobiDN Jacobi DN elliptic function

jacobiDS Jacobi DS elliptic function

jacobiNC Jacobi NC elliptic function

jacobiND Jacobi ND elliptic function

jacobiNS Jacobi NS elliptic function

jacobiSC Jacobi SC elliptic function

jacobiSD Jacobi SD elliptic function

jacobiSN Jacobi SN elliptic function

jacobiZeta Jacobi zeta function

dirac Dirac delta function

heaviside Heaviside step function

kroneckerDelta Kronecker delta function

rectangularPulse Rectangular pulse function

triangularPulse Triangular pulse function

airy Airy function

besselh Bessel function of third kind (Hankel function) for symbolic expressions

besseli Modified Bessel function of the first kind for symbolic expressions

besselj Bessel function of the first kind for symbolic expressions

besselk Modified Bessel function of the second kind for symbolic expressions

bessely Bessel function of the second kind for symbolic expressions

hypergeom Hypergeometric function

kummerU Confluent hypergeometric Kummer U function

meijerG Meijer G-function

whittakerM Whittaker M function

whittakerW Whittaker W function

lambertw Lambert W function

wrightOmega Wright omega function

Numbers and Precision

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 9/11
04/06/2020 Symbolic Math Toolbox — Functions

digits Change variable precision used

double Convert symbolic values to MATLAB double precision

vpa Variable-precision arithmetic (arbitrary-precision arithmetic)

imag Imaginary part of complex number

real Real part of complex number

dec2bin Convert decimal number to character vector representing binary number

dec2hex Convert decimal number to character vector representing hexadecimal number

Number Theory
divisors Divisors of integer or expression

factorIntegerPower Perfect power factoring

gcd GCD of numbers and polynomials

isPrimitiveRoot Determine which array elements are primitive roots

lcm Least common multiple

mod Symbolic modulus after division

powermod Modular exponentiation

quorem Quotient and remainder

rem Remainder after division

bernoulli Bernoulli numbers and polynomials

euler Euler numbers and polynomials

fibonacci Fibonacci numbers

harmonic Harmonic function (harmonic number)

rat Rational fraction approximation (continued fraction)

nextprime Next prime number

nthprime nth prime number

prevprime Previous prime number

eulerPhi Euler phi function

jacobiSymbol Jacobi symbol

Graphics
fanimator Create stop-motion animation object

playAnimation Play animation objects in a MATLAB figure window

rewindAnimation Rewind previously played animation objects

writeAnimation Save animation as video file

animationToFrame Return structure of frames from animation objects

fcontour Plot contours

fimplicit Plot implicit symbolic equation or function

fimplicit3 Plot 3-D implicit equation or function

fmesh Plot 3-D mesh

fplot Plot symbolic expression or function

fplot3 Plot 3-D parametric curve

fsurf Plot 3-D surface

ezpolar Polar coordinate plotter

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 10/11
04/06/2020 Symbolic Math Toolbox — Functions

Code Generation
matlabFunction Convert symbolic expression to function handle or file

matlabFunctionBlock Convert symbolic expression to MATLAB function block

simscapeEquation Convert symbolic expressions to Simscape language equations

symReadSSCParameters Load parameters from Simscape component

symReadSSCVariables Load variables from Simscape component

symWriteSSC Create new Simscape component

ccode C code representation of symbolic expression

fortran Fortran representation of symbolic expression

latex LaTeX form of symbolic expression

mathml Generate MathML from symbolic expression

texlabel TeX representation of symbolic expression

MuPAD to MATLAB Migration


convertMuPADNotebook Convert MuPAD notebook to MATLAB live script

https://www.mathworks.com/help/symbolic/referencelist.html?type=function 11/11

You might also like