Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# Functions in Symbolic Math Toolbox

• By Category | Alphabetical List
• ## Symbolic Computations in MATLAB

### Symbolic Variables, Expressions, and Functions

 argnames Input variables of symbolic function children Subexpressions or terms of symbolic expression formula Mathematical expression defining symbolic function funtool Function calculator pretty Prettyprint symbolic expressions sym Create symbolic objects symfun Create symbolic functions syms Shortcut for creating symbolic variables and functions symvar Find symbolic variables in symbolic expression, matrix, or function

### Operators and Elementary Operations

#### Arithmetic Operations

 Arithmetic Operations Perform arithmetic operations on symbols ceil Round symbolic matrix toward positive infinity conj Symbolic complex conjugate cumprod Symbolic cumulative product cumsum Symbolic cumulative sum fix Round toward zero floor Round symbolic matrix toward negative infinity frac Symbolic matrix element-wise fractional parts imag Imaginary part of complex number mod Symbolic matrix element-wise modulus quorem Quotient and remainder real Real part of complex number round Symbolic matrix element-wise round

#### Relational Operations

 eq Define equation ge Define greater than or equal to relation gt Define greater than relation le Define less than or equal to relation lt Define less than relation ne Define inequality isequaln Test symbolic objects for equality, treating NaN values as equal

#### Logical Operations

 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 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

### Conversion Between Symbolic and Numeric

 char Convert symbolic objects to strings double Convert symbolic matrix to MATLAB numeric form int8, int16, int32, int64 Convert symbolic matrix to signed integers poly2sym Polynomial coefficient vector to symbolic polynomial single Convert symbolic matrix to single precision sym Create symbolic objects sym2poly Symbolic-to-numeric polynomial conversion symfun Create symbolic functions uint8, uint16, uint32, uint64 Convert symbolic matrix to unsigned integers vpa Variable-precision arithmetic

## Mathematics

### Equation Solving

#### Algebraic Equations and Systems

 equationsToMatrix Convert set of linear equations to matrix form finverse Functional inverse linsolve Solve linear system of equations given in matrix form poles Poles of expression or function solve Equations and systems solver vpasolve Numeric solver

#### Ordinary Differential Equations and Systems

 dsolve Ordinary differential equation and system solver odeToVectorField Convert higher-order differential equations to systems of first-order differential equations

### Formula Manipulation and Simplification

#### Simplification

 simplify Algebraic simplification simplifyFraction Symbolic simplification of fractions simple Search for simplest form of symbolic expression

#### Formula Rearrangement and Rewriting

 coeffs Coefficients of polynomial collect Collect coefficients compose Functional composition expand Symbolic expansion of polynomials and elementary functions factor Factorization horner Horner nested polynomial representation numden Numerator and denominator rewrite Rewrite expression in new terms subexpr Rewrite symbolic expression in terms of common subexpressions

#### Substitution

 subexpr Rewrite symbolic expression in terms of common subexpressions subs Symbolic substitution

### Calculus

#### Differentiation

 diff Differentiate symbolic expression or function

#### Integration

 int Definite and indefinite integrals rsums Interactive evaluation of Riemann sums

#### Vector Analysis

 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

#### Series

 cumprod Symbolic cumulative product cumsum Symbolic cumulative sum rsums Interactive evaluation of Riemann sums symprod Product of series symsum Sum of series taylor Taylor series expansion taylortool Taylor series calculator

#### Limits

 limit Compute limit of symbolic expression

#### Transforms

 fourier Fourier transform ifourier Inverse Fourier transform ilaplace Inverse Laplace transform iztrans Inverse Z-transform laplace Laplace transform ztrans Z-transform

### Linear Algebra

#### Matrix Operations and Transformations

 bernstein Bernstein polynomials bernsteinMatrix Bernstein matrix diag Create or extract diagonals of symbolic matrices expm Compute symbolic matrix exponential inv Compute symbolic matrix inverse pinv Moore-Penrose inverse (pseudoinverse) of symbolic matrix size Symbolic matrix dimensions sort Sort symbolic vectors, matrices, or polynomials toeplitz Symbolic Toeplitz matrix tril Return lower triangular part of symbolic matrix triu Return upper triangular part of symbolic matrix

#### Matrix Analysis

 adjoint Adjoint of symbolic square matrix charpoly Characteristic polynomial of matrix cond Condition number of matrix curl Curl of vector field det Compute determinant of symbolic matrix 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 minpoly Minimal polynomial of matrix norm Norm of matrix or vector potential Potential of vector field sqrtm Matrix square root vectorPotential Vector potential of vector field

#### Vector Spaces and Subspaces

 colspace Column space of matrix null Form basis for null space of matrix orth Orthonormal basis for range of symbolic matrix rank Compute rank of symbolic matrix rref Compute reduced row echelon form of matrix size Symbolic matrix dimensions

#### Eigenvalues, Eigenvectors, and Matrix Decomposition

 charpoly Characteristic polynomial of matrix chol Cholesky factorization eig Eigenvalues and eigenvectors of symbolic matrix jordan Jordan form of matrix lu LU factorization svd Singular value decomposition of symbolic matrix

#### Linear Equations

 cond Condition number of matrix det Compute determinant of symbolic matrix equationsToMatrix Convert set of linear equations to matrix form inv Compute symbolic matrix inverse linsolve Solve linear system of equations given in matrix form norm Norm of matrix or vector rank Compute rank of symbolic matrix

### Assumptions

 assume Set assumption on symbolic object assumeAlso Add assumption on symbolic object assumptions Show assumptions set on symbolic variable clear all Remove items from MATLAB workspace and reset MuPAD engine isAlways Check whether equation or inequality holds for all values of its variables 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 reset Close MuPAD engine

### Polynomials

 charpoly Characteristic polynomial of matrix coeffs Coefficients of polynomial minpoly Minimal polynomial of matrix poly2sym Polynomial coefficient vector to symbolic polynomial sort Sort symbolic vectors, matrices, or polynomials sym2poly Symbolic-to-numeric polynomial conversion

### Mathematical Functions

#### Logarithms

 log Natural logarithm of entries of symbolic matrix log10 Logarithm base 10 of entries of symbolic matrix log2 Logarithm base 2 of entries of symbolic matrix mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun

#### Complex Numbers

 abs Absolute value of real or complex value 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

#### Special Functions

##### Dirac and Heaviside Functions
 dirac Dirac delta heaviside Heaviside step function mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun rectangularPulse Rectangular pulse function triangularPulse Triangular pulse function
##### Gamma Functions
 beta Beta function factorial Factorial function gamma Gamma function mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun nchoosek Binomial coefficient
##### Zeta Function and Polylogarithms
 mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun psi Digamma function zeta Riemann zeta function
##### Airy and Bessel Functions
 airy Airy function besseli Modified Bessel function of the first kind besselj Bessel function of the first kind besselk Modified Bessel function of the second kind bessely Bessel function of the second kind mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun
##### Exponential and Trigonometric Integrals
 cosint Cosine integral ei One-argument exponential integral function expint Exponential integral function mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun sinint Sine integral
##### Error Functions
 erf Error function erfc Complementary error function erfcinv Inverse complementary error function erfi Imaginary error function erfinv Inverse error function mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun
##### Hypergeometric and Whittaker Functions
 hypergeom Hypergeometric function mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun whittakerM Whittaker M function whittakerW Whittaker W function
##### Elliptic Integrals
 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 Elliptic integral of the second kind ellipticF Incomplete elliptic integral of the first kind ellipticK Complete elliptic integral of the first kind ellipticPi Elliptic integral of the third kind
##### Lambert W and Wright Functions
 lambertw Lambert W function mfun Numeric evaluation of special mathematical function mfunlist List special functions for use with mfun wrightOmega Wright omega function

### Numbers and Precision

#### Precision Control

 digits Variable-precision accuracy double Convert symbolic matrix to MATLAB numeric form vpa Variable-precision arithmetic

#### Operations on Numbers

 ceil Round symbolic matrix toward positive infinity conj Symbolic complex conjugate fix Round toward zero floor Round symbolic matrix toward negative infinity frac Symbolic matrix element-wise fractional parts imag Imaginary part of complex number mod Symbolic matrix element-wise modulus quorem Quotient and remainder real Real part of complex number round Symbolic matrix element-wise round

## Graphics

### Function Plots

 ezcontour Contour plotter ezcontourf Filled contour plotter ezmesh 3-D mesh plotter ezmeshc Combined mesh and contour plotter ezplot Plot symbolic expression, equation, or function ezplot3 3-D parametric curve plotter ezpolar Polar coordinate plotter ezsurf 3-D colored surface plotter ezsurfc Combined surface and contour plotter

## Code Generation

 ccode C code representation of symbolic expression fortran Fortran representation of symbolic expression latex LaTeX representation of symbolic expression 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