Symbolic Math Toolbox    
subexpr

Rewrite a symbolic expression in terms of common subexpressions

Syntax

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).

Examples

The statements

return the rewritten expression for t in r in terms of a common subexpression, which is returned in s.

See Also

pretty, simple, subs


  solve subs 

Learn more about the latest releases of MathWorks products:

 © 1994-2010 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS