Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Dot product

`C = dot(`

returns
the scalar dot
product of `A,B`

)`A`

and `B`

.

If

`A`

and`B`

are vectors, then they must have the same length.If

`A`

and`B`

are matrices or multidimensional arrays, then they must have the same size. In this case, the`dot`

function treats`A`

and`B`

as collections of vectors. The function calculates the dot product of corresponding vectors along the first array dimension whose size does not equal 1.

Was this topic helpful?