.*
Element-wise matrix multiplication operator.
Syntax
R = A .* B
Inputs
- A
- Any valid scalar | vector | matrix.
- B
- Any valid scalar | complex number | matrix.
Outputs
- R
- Resulting scalar | complex number | matrix
Examples
Basic dot product example with two scalars:
R = 3.*2
R = 6
Dot product of a matrix and a scalar:
R = [1 2 5 3].*2
R = [ 2 4 10 6 ]
Dot product of a matrix and a matrix:
R = [1 3 6].*[7 2 8]
R = [ 7 6 48 ]
Comments
Works differently than scalar multiplication. Please refer to the User Guide for more info on operand combinations.