Full Command and Function Reference 3-101
'
SIN(&A)*COS(&B)+COS(&A)*SIN(&B)'. Multiple occurrences of a particular wildcard in a
pattern must match identical subexpressions.
↓MATCH works from top down; that is, it checks the entire expression first. This approach
works well for expansion. An expression expanded during one execution of ↓MATCH will
contain additional subexpressions, and those subexpressions can be expanded by another
execution of ↓MATCH. Several expressions can be expanded by one execution of ↓MATCH
provided none is a subexpression of any other.
Access: …µ↓
MATCH
Input/Output:
Level 2/Argument 1 Level 1/Argument 2 Level 2/Item 1
Level 1/Item
2
'symb
1
' { 'symb
pat
' 'symb
repl
' }
→
'symb
2
' 0/1
'symb
1
' { 'symb
pat
' 'symb
repl
' 'symb
cond
' }
→
'symb
2
' 0/1
See also: ↑MATCH
↑MATCH
Type: Command
Description: Bottom-Up Match and Replace Command: Rewrites an expression.
↑MATCH rewrites expressions or subexpressions that match a specified pattern
'symb
pat
'. An
optional condition,
'symb
cond
', can further restrict whether a rewrite occurs. A test result is also
returned to indicate if command execution produced a rewrite; 1 if it did, 0 if it did not.
The pattern
'symb
pat
' and replacement 'symb
repl
' can be normal expressions; for example, you can
replace
'SIN(π/6)' with '1/2'. You can also use a “wildcard” in the pattern (to match any
subexpression) and in the replacement (to represent that expression). A wildcard is a name that
begins with &, such as the name
'&A', used in replacing 'SIN(&A+π)' with '–SIN(&A)'. Multiple
occurrences of a particular wildcard in a pattern must match identical subexpressions.
↑MATCH works from bottom up; that is, it checks the lowest level (most deeply nested)
subexpressions first. This approach works well for simplification. A subexpression simplified
during one execution of ↑MATCH will be a simpler argument of its parent expression, so the
parent expression can be simplified by another execution of ↑MATCH.
Several subexpressions can be simplified by one execution of ↑MATCH provided none is a
subexpression of any other.
Access: …µ↑
MATCH
Input/Output:
Level 2/Argument 1 Level 1/Argument 2 Level 2/Item 1 Level 1/Item 2
'symb
1
' { 'symb
pat
', 'symb
repl
' }
→
'symb
2
' 0/1
'symb
1
' { 'symb
pat
', 'symb
repl
', 'symb
cond
' }
→
'symb
2
' 0/1
See also: ↓MATCH
MATHS
CAS: Display a menu or list of CAS mathematics submenus.
MATR
CAS: Display a menu or list of CAS commands for matrix operations.
MAX
Type: Function