OrderAs
OrderAs[ expr1, expr2 ]
OrderAs[ expr1, expr2 ] orders the arguments of expr1to the order of the arguments of expr2. Arguments of expr1 that do not occur in expr2 are appended to the resulting expression. You typically use it when expr2 is a student expression, which we modified in some way to obtain expr1, such that the resulting expression has a similar order as the student expression.
| Example | in | out |
|---|---|---|
The expression 2b+ p+3q ordered based on 3q + p + 3a. |
OrderAs[ 2b+ p+3q, 3q + p + 3a] |
3q+p+2b |