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.

Functions

expand all

symCreate symbolic variables, expressions, functions, matrices
symsCreate symbolic variables and functions
symfunCreate symbolic functions
str2symEvaluate string representing symbolic expression
foldCombine (fold) vector using function
piecewiseConditionally defined expression or function
symvarFind symbolic variables in symbolic input
argnamesInput variables of symbolic function
formulaReturn body of symbolic function
hasCheck if expression contains particular subexpression
childrenSubexpressions or terms of symbolic expression
symTypeDetermine type of symbolic object
symFunTypeDetermine functional type of symbolic object
isSymTypeDetermine whether symbolic object is specific type
hasSymTypeDetermine whether symbolic object contains specific type
findSymTypeFind symbolic subobjects of specific type
mapSymTypeApply function to symbolic subobjects of specific type
isfiniteCheck whether symbolic array elements are finite
isinfCheck whether symbolic array elements are infinite
isnanCheck whether symbolic array elements are NaNs
symprefSet symbolic preferences

Topics

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.

Change Output Display Format of Symbolic Results

Modify output of symbolic results.

Add Subscripts, Superscripts, and Accents to Symbolic Variables

Add suffixes to symbolic variables.