Programming and Data Types |
MATLAB provides these arithmetic operators.
Arithmetic Operators and Arrays
Except for some matrix operators, MATLAB arithmetic operators work on corresponding elements of arrays with equal dimensions. For vectors and rectangular arrays, both operands must be the same size unless one is a scalar. If one operand is a scalar and the other is not, MATLAB applies the scalar to every element of the other operand - this property is known as scalar expansion.
This example uses scalar expansion to compute the product of a scalar operand and a matrix.
Operators | Relational Operators |