MATLAB Programming/Operators

< MATLAB Programming

MATLAB Operators

Operators

Operator Function
Unary Operators
+ positive number
- negate
% comment
' transpose
@ function handle
Binary Operators
+ addition
- subtraction
* inner product (multiplication)
/ division (matrix right)
\ left division
^ power
: (colon) generates a sequence
Element-wise Operators
.* element-wise inner product (multiplication)
./ element-wise division (matrix right)
.\ element-wise left division
.^ element-wise power
.' element-wise transpose
Relational Operators
< less than
<= less than or equal to
> greater than
>= greater than or equal to
== equal to
~= not equal to
Logical Operators
&& logical AND
| | logical OR
~ logical NOT
Other Operators
, Array row separator
; Array column separator
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.