dot

Vector dot product.

Syntax

R = dot(x,y)

R = dot(x,y,dim)

Inputs

x,y
Vectors or matrices on which the dot product is performed.
Dimension: vector | matrix
dim
Dimension on which to perform the calculation.
Default: first non-singleton dimension.
Type: integer
Dimension: scalar

Outputs

R
The dot product output.

Example

Vector inputs.

R = dot([1,2,3,4],[6,-2,1.2,-5])
R = -14.4