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, output::subexpr(e) returns a list that contains the abbreviated expression and the abbreviations in a form of equations. With output::subexpr you 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 of Pref::abbreviateOutput.
By default, MuPAD® generates abbreviations using the # symbol followed by numbers. Using the argument varname, 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)