prog::exprtree -- visualize an
expression as tree
Introductionprog::exprtree(ex) visualizes any
MuPAD expression ex as tree.
Call(s)prog::exprtree(ex <, Quiet>)
Parametersex |
- | expression to visualize |
OptionsQuiet |
- | suppress screen output |
Returnsan object of type adt::Tree
Related
Functions
Detailsprog::exprtree visualizes the tree structure of any
MuPAD expression.
Option: Quietadt::Tree
represents the tree structure of ex.
Example
1The example shows the structure of the expression
a + b*2 - d*(a + c):
>> prog::exprtree(a + b*2 - d*(a + c))
_plus
|
+-- a
|
+-- _mult
| |
| +-- b
| |
| `-- 2
|
`-- _mult
|
+-- d
|
+-- _plus
| |
| +-- a
| |
| `-- c
|
`-- -1
Tree1
Tree1 is the return value of type adt::Tree. This object can be exposed or taken for other
operations.
The option Quiet suppresses the output, only the tree is returned:
>> prog::exprtree(a + b*2 - d*(a + c), Quiet)
Tree2