Abbreviates a expression
This functionality does not run in MATLAB.
output::subexpr rewrites symbolic expression
in terms of common subexpressions.
If an expression
e contains common subexpressions,
a list that contains the abbreviated expression and the abbreviations
in a form of equations. With
get the same abbreviations as you see in the outputs. See Example 1.
An output of this command does not depend on the current setting
By default, MuPAD® generates abbreviations using the # symbol
followed by numbers. Using the argument
you can customize the names of abbreviated subexpressions. See Example 2.
You can abbreviate an expression:
y := solve(x^3 + x + 1 = 0, x, MaxDegree = 3): output::subexpr(y)
You can customize the names of abbreviated subexpressions:
y := solve(x^3 + x + 1 = 0, x, MaxDegree = 3): output::subexpr(y, t)
A MuPAD expression
A base name for the abbreviation variables
List that contains the abbreviated expression and the abbreviations as equations