Calculates the dot product of two matrices, which must have the same number of elements. The dot product of matrices A and B will be computed with the following formula:
$$ C=\sum_iconj(A(i))B(i) $$
Syntax |
Description |
---|---|
C = dot(A, B); |
Returns the dot product of A and B |
Example
A = [1,1,0]; B = [0,1,0]; ?C = dot(A,B); result: 1 A = [1,1+1i,0]; B = [0,1i,0]; ?C = dot(A,B); ?C = conj(A(1))*B(1)+conj(A(2))*B(2)+conj(A(3))*B(3); result: 1+1i result: 1+1i ?dot(B,A); result: 1-1i
See Also
List of commands , cross , * , length , size