Visualize an expression as tree
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
prog::exprtree(ex) visualizes any MuPAD® expression
Every expression in MuPAD is internally a tree. The operations are the nodes, and the operands are the leafs.
The example shows the structure of the expression
+ b*2 - d*(a + c):
prog::exprtree(a + b*2 - d*(a + c))
_plus | +-- a | +-- _mult | | | +-- b | | | `-- 2 | `-- _mult | +-- d | +-- _plus | | | +-- a | | | `-- c | `-- -1
Quiet suppresses the output, only
the tree is returned:
prog::exprtree(a + b*2 - d*(a + c), Quiet)
Expression to visualize
With this option no output will be printed on screen. The return
value of type
Object of type