Symbolic Math Toolbox

Key Features

Computing in Symbolic Math Toolbox

Symbolic Math Toolbox provides a complete set of tools for symbolic computing that augments the numeric capabilities of MATLAB. The toolbox includes extensive symbolic functionality that you can access directly from the MATLAB command line or from the MuPAD Notebook. You can extend the functionality available in the toolbox by writing custom symbolic functions or libraries in the MuPAD language.

The toolbox also enables you to translate symbolic results for use with MATLAB, Simulink, and Simscape.

A surface generated from a symbolic equation, plotted from the MATLAB command line.
A surface generated from a symbolic equation, plotted from the MATLAB command line.
A parametric surface of velocity versus mass and elasticity for a mass-spring-damper system, plotted from the MuPAD Notebook app.
A parametric surface of velocity versus mass and elasticity for a mass-spring-damper system, plotted in the MuPAD Notebook.

Symbolic Computations in MATLAB

Symbolic Math Toolbox lets you perform symbolic computations from the MATLAB command line by defining symbolic math expressions and operating on them. Functions are called using the familiar MATLAB syntax and are available for integration, differentiation, simplification, equation solving, and other mathematical tasks.

Computing symbolic integrals in MATLAB using familiar MATLAB syntax.
Computing symbolic integrals in MATLAB using familiar MATLAB syntax.

Integration, Differentiation, and Other Calculus

You can perform differentiation and definite and indefinite integration, calculate limits, compute series summation and product, generate the Taylor series, and compute Laplace, Fourier, and Z-transforms and their inverses. You can also perform vector calculus such as calculating the curl, divergence, gradient, Jacobian, Laplacian, and potential.

Computing analytical Jacobian in MATLAB
Computing analytical Jacobian in MATLAB.

Formula Manipulation and Simplification

Symbolic Math Toolbox enables you to simplify long expressions into shorter forms, transform expressions to particular forms or rewrite them in specific terms, and replace parts of expressions with specified symbolic or numeric values.

Equation Solving

You can analytically solve for well-posed systems of algebraic equations and ordinary differential equations to get exact answers that are free from numerical approximations.

Analytically solving systems of algebraic equations in MATLAB.
Analytically solving systems of algebraic equations in MATLAB.

Linear Algebra

You can perform matrix analysis on symbolic matrices such as computing norm, condition number, determinant, and characteristic polynomial. You can execute matrix operations and transformations with functions for computing the inverse and exponential, and for working with rows and columns of the matrix. You can also get symbolic expressions for the eigenvalues and eigenvectors and perform a symbolic singular value decomposition of a matrix.

Mathematical Functions

Symbolic Math Toolbox includes the symbolic versions of many mathematical functions, such as logarithm, Dirac, gamma, Bessel, Airy, LambertW, hypergeom, and error functions.

Executing MuPAD Statements

From MATLAB you can also execute statements written in the MuPAD language, which lets you fully access the functionality in the MuPAD engine.

Interactive Computations in the MuPAD Notebook

The MuPAD Notebook provides an interactive environment for performing symbolic computations using the MuPAD language. It includes a symbol palette for accessing common MuPAD functions, and all results are displayed in typeset math that can be converted into MathML and TeX. You can embed graphics, animations, and descriptive text within your notebook to help manage and document your work.

Text, graphics, and typeset math in the MuPAD Notebook
Text, graphics, and typeset math in the MuPAD Notebook.

Symbolic Math Toolbox provides functions for sharing symbolic variables and expressions between the MuPAD Notebook and the MATLAB workspace, enabling you to merge the work you do in each environment.

Using the MuPAD Notebook to analyze the Gibbs phenomenon of a periodic step function.
Using the MuPAD Notebook to analyze the Gibbs phenomenon of a periodic step function. MuPAD notebooks let you perform and document symbolic computations.
Using the MuPAD Notebook to perform multivariate integration.
Using the MuPAD Notebook to perform multivariate integration. MuPAD notebooks let you display calculations in typeset math.

Generating Code for MATLAB, Simulink, and Simscape

The results of symbolic computations are often used in numeric codes that exclusively use standard double-precision arithmetic.

Symbolic Math Toolbox provides functions for generating MATLAB functions, Simulink function blocks, and equations based on the Simscape language – directly from symbolic expressions.

Translating symbolic code to MATLAB, Simulink, and Simscape.
Translating analytical results for use in MATLAB, Simulink, and Simscape.

With these functions, you can convert the result of your symbolic computations into functions based on numeric computation, ready to be used in other parts of your program. Using the generated MATLAB functions does not require a license for Symbolic Math Toolbox. You can also convert symbolic expressions into C, Fortran, MathML, and TeX code.

Converting symbolic expressions to MATLAB functions.
Creating MATLAB functions automatically from symbolic expressions.

Variable-Precision Arithmetic

With Symbolic Math Toolbox, you can declare variable-precision arithmetic variables and perform arithmetic operations on them. Variable-precision arithmetic is useful for situations where you require high precision for your numeric calculations or you need to check the results of an algorithm that uses standard double-precision arithmetic. You can set the decimal digit accuracy for numeric computations to be as high as you need and maintain the accuracy for all symbolic math functions and operations.

Variable-precision arithmetic.
Programming with variable-precision arithmetic.

Programming in the MuPAD Language

The MuPAD Notebook provides a debugger and other programming utilities for authoring custom symbolic functions and libraries in the MuPAD language. The language supports multiple programming styles, including imperative, functional, and object-oriented programming. The language treats variables as symbolic by default, and it is optimized for handling and operating on symbolic math expressions.

The MuPAD procedure for rotating a vector in three dimensions.
The MuPAD procedure for rotating a vector in three dimensions. The MuPAD language is optimized for handling and operating on symbolic math expressions.

Try Symbolic Math Toolbox

Get trial software

Mathematical Modeling with MATLAB Products

View webinar