| Symbolic Math Toolbox | ![]() |
Syntax
[Y,SIGMA] = subexpr(X,SIGMA) [Y,SIGMA] = subexpr(X,'SIGMA')
Description
[Y,SIGMA] = subexpr(X,SIGMA) or [Y,SIGMA] = subexpr(X,'SIGMA') rewrites the symbolic expression X in terms of its common subexpressions. These are the subexpressions that are written as %1, %2, etc. by pretty(S).
t = solve('a*x^3+b*x^2+c*x+d = 0');
[r,s] = subexpr(t,'s');
return the rewritten expression for t in r in terms of a common subexpression, which is returned in s.
| solve | subs | ![]() |