| Left to Right |
1 |
. |
Namespace delimiter |
|
|
function() |
Function call |
|
|
variable() |
Access matrix element |
|
|
[] |
Matrix constant |
|
|
(expression) |
Override precedence |
|
|
' |
Derivative with respect to time |
| Right to Left |
2 |
^ |
Exponentiation |
|
3 |
- |
Unary minus (makes a negative number) |
|
|
! |
Logical NOT; Matrix inversion. The solution to Ax=b when A is tall or square is x=!A*b. When A is wide, it is x=~(~b*!A). That is, !A on a wide matrix is equivalent to !(~A). |
|
|
~ |
Matrix transpose |
| Left to Right |
4 |
* |
Multiply. For matrices, this is the usual whole-matrix multiply. |
|
|
& |
Matrix elementwise (Hadamard) multiply |
|
|
/ |
Divide |
|
|
% |
Modulo. Result has same sign as divisor. |
|
5 |
+ |
Add |
|
|
- |
Subtract |
|
6 |
< |
Less than |
|
|
<= |
Less than or equal to |
|
|
> |
Greater than |
|
|
>= |
Greater than or equal to |
|
7 |
== |
Equal to. For matrices, returns a matrix indicating the result of elementwise comparison. To get back a single scalar value indicating whole-matrix equality, use the function equal(A,B). |
|
|
!= |
Not equal to |
|
8 |
&& |
Logical AND |
|
9 |
|| |
Logical OR |
|
10 |
, |
Separate expressions in a list, or elements in a row of a matrix. |
|
11 |
; |
Separate rows in a matrix |
| None |
12 |
= |
Defines a variable. By default it is temporary unless the compiler determines that it must be state (saved and buffered). |
|
|
=: |
Defines a variable and explicitly makes it state rather than temporary. |
|
|
=; |
Defines a variable and hints that it should be temporary, even if some criteria are not met (see Language: Order of Evaluation). The compiler will respect this if possible, but may still need to make it a state variable. |
|
|
=+ |
Defines a state variable that accumulates the sum across multiple parts. This is a type of reduction operator. There is no corresponding =- operator because it would be ambiguous with an equation that starts with negation. |
|
|
=* |
Accumulates the product |
|
|
=/ |
Accumulates the quotient (product of reciprocals) |
|
|
=< |
Accumulates the minimum |
|
|
=> |
Accumulates the maximum |
|
13 |
@ |
Indicates conditional execution of an expression. |