Main Content

Symbolic Variables, Expressions, Functions, and Preferences

Create symbolic variables, expressions, functions, and set preferences

符号数学工具箱™ 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 more details about symbolic objects, seeSymbolic Objects to Represent Mathematical Objects. For a quick guide on creating symbolic variables, expressions, and functions, seeCreate Symbolic Numbers, Variables, and ExpressionsCreate Symbolic Functions.

Functions

expand all

syms Create symbolic scalar variables and functions, and matrix variables and functions
sym Create symbolic variables, expressions, functions, matrices
symfun Create symbolic functions
symmatrix Create symbolic matrix variable
symmatrix2sym 将符号矩阵变量转换为标量变量数组
symfunmatrix Create symbolic matrix function
symfunmatrix2symfun Convert symbolic matrix function to symbolic function
str2sym Evaluate string representing symbolic expression
fold Combine (fold) vector using function
piecewise 有条件定义的表达或功能
symvar Find symbolic variables in symbolic input
argnames Input variables of symbolic function or matrix function
formula 返回符号函数或矩阵函数的主体
has Check if expression contains particular subexpression
children Subexpressions or terms of symbolic expression
symType Determine type of symbolic object
symFunType Determine functional type of symbolic object
isSymType 确定符号对象是否为特定类型
hasSymType 确定符号对象是否包含特定类型
findSymType 查找特定类型的符号子obObject
mapSymType Apply function to symbolic subobjects of specific type
isfinite Check whether symbolic array elements are finite
isinf Check whether symbolic array elements are infinite
isnan Check whether symbolic array elements areNaNs
sympref 设置符号偏好

Topics