This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Symbolic Variables, Expressions, Functions, and Preferences

Create symbolic variables, expressions, functions, and set preferences

Symbolic Math Toolbox™ introduces a special data type — symbolic objects. This data type includes symbolic numbers, symbolic variables, symbolic expressions, and symbolic functions. It also includes vectors, matrices, and multidimensional arrays of symbolic numbers, variables, expressions, and functions. Using symbolic objects in computations indicates that MATLAB® must perform these computations analytically instead of numerically. Symbolic computations are exact and are not prone to round-off errors. For a quick guide on creating symbolic variables, expressions, and functions, see Create Symbolic Numbers, Variables, and Expressions and Create Symbolic Functions.


expand all

foldCombine (fold) vector using function
piecewiseConditionally defined expression or function
symCreate symbolic variables, expressions, functions, matrices
str2symEvaluate string representing symbolic expression
symfunCreate symbolic functions
symsCreate symbolic variables and functions
symvarFind symbolic variables in symbolic input
argnamesInput variables of symbolic function
childrenSubexpressions or terms of symbolic expression
formulaReturn body of symbolic function
hasCheck if expression contains particular subexpression
prettyPrettyprint symbolic expressions
isfiniteCheck whether symbolic array elements are finite
isinfCheck whether symbolic array elements are infinite
isnanCheck whether symbolic array elements are NaNs
funtoolFunction calculator
symprefSet symbolic preferences


Create Symbolic Numbers, Variables, and Expressions

Use symbolic values and variables.

Create Symbolic Functions

Use symbolic functions that accept symbolic inputs, such as f(x,y).

Create Symbolic Matrices

Use matrices containing symbolic values.

Find Symbolic Variables in Expressions, Functions, Matrices

Find variables in symbolic expressions.

Featured Examples