Operator
| Symbol | Role |
|---|
+ | Addition; Unary plus |
- | Subtraction; Unary minus |
.* | Element-wise multiplication |
* | Matrix multiplication |
./ | Element-wise right division |
/ | Matrix right division |
.\ | Element-wise left division |
\ | Matrix left division (also known as backslash) |
.^ | Element-wise power |
^ | Matrix power |
.' | Transpose |
' | Complex conjugate transpose |
| Symbol | Role |
|---|
== | Equal to |
~= | Not equal to |
> | Greater than |
>= | Greater than or equal to |
< | Less than |
<= | Less than or equal to |
| Symbol | Role |
|---|
& | Find logical AND |
| |
&& | Find logical AND (with short-circuiting) |
| |
~ | Find logical NOT |
| Symbol | Effect on Text |
|---|
'' | Single quotation mark |
| “ | Cell delimiter |
%{ %} | Block comments that extend beyond one line |
! | Operating system command |
? | Metaclass for MATLAB class |
~ | Argument placeholder to suppress specific input or output arguments |
< & | Specify superclasses |
.? | Specify fields of name-value structure when using function argument validation |
Operator Precedence
()
~, sign +, -
^, .^, transpose ', .'
.*, *, ./, /, .\, \
+, -
:
<, <=, ==, >=, >, ~=
&
|
&&
||