Accelerating the pace of engineering and science

Symbolic Math Toolbox

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

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.

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.

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.

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.

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. MuPAD notebooks let you perform and document symbolic computations.
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 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.

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.

Programming with variable-precision arithmetic.