symmatrix2sym
Syntax
Description
converts a symbolic matrix variable S
= symmatrix2sym(M
)M
of type
symmatrix
to an array of symbolic scalar variables S
of type sym
.
The output array is the same size as the input symbolic matrix variable and its
components are filled with automatically generated elements. For example, syms M [1
3] matrix; S = symmatrix2sym(M)
creates the matrix S = [M1_1, M1_2,
M1_3]
. The generated elements M1_1
, M1_2
,
and M1_3
do not appear in the MATLAB® workspace.
Examples
Input Arguments
Tips
To show all the functions in Symbolic Math Toolbox™ that accept symbolic matrix variables as input, use the command
methods symmatrix
.Instead of using
symmatrix2sym
to convert a symbolic matrix variable to an array of symbolic scalar variables, you can use the shortcutsym
. For an example, see Convert Hessian Matrix. (since R2022b)
Version History
Introduced in R2021a