Note: Use only in the MuPAD Notebook Interface. This functionality does not run in MATLAB.
A useful model for visualizing a MuPAD® expression is the expression tree. It reflects the internal representation of an expression. The operators or their corresponding functions are the vertices, and the arguments are sub-trees. The lowest precedence operator is always at the root of an expression tree.
For example, you can represent the expression
a + b
* c + d * e *sin(f)^g using this expression tree.
The following expression tree represents the expression
x = 0..1).
MuPAD internally represents the difference
a + b*(-1). Therefore, MuPAD represents
the difference using this expression tree.
Similarly, a quotient
a/b has the internal
a * b^(-1).
To display expression trees in a MuPAD notebook, use the
It replaces operators with the names of the corresponding system functions:
prog::exprtree(a + b * c + d * e *sin(f)^g):
_plus | +-- a | +-- _mult | | | +-- b | | | `-- c | `-- _mult | +-- d | +-- e | `-- _power | +-- sin | | | `-- f | `-- g