Dot product of matrix, MATLAB in Engineering

Dot Product:

The dot or inner product of two vectors a and b is written as a • b and is defined as 

793_dot product.png

In another words, this is like matrix multiplication when multiplying a row vector a by a column vector b; and the result is a scalar. This can be accomplished by using the * operator and transposing the second vector, or by using the dot function in a MATLAB:

>> vec1 = [4 2 5 1];

>> vec2 = [3 6 1 2];

>> vec1*vec2'

ans =

        31

>> dot(vec1,vec2)

ans =

        31

Posted Date: 10/22/2012 2:36:01 AM | Location : United States







Related Discussions:- Dot product of matrix, Assignment Help, Ask Question on Dot product of matrix, Get Answer, Expert's Help, Dot product of matrix Discussions

Write discussion on Dot product of matrix
Your posts are moderated
Related Questions
Creating a cell array: The other method of creating a cell array is easy to assign values to particular array elements and build it up element by element. Though, as explained

Use of built-in colormaps: MATLAB has built-in colormaps, it is also possible to generate others by using combinations of any colors. For illustration, the following generates

Use polyval to evaluate the derivative at xder. This will be the % slope of the tangent line, "a" (general form of a line: y = ax + b). % 4. Calculate the intercept, b, of t

. Generate the following signal, x(n)=1+cos((25*pi*n)/100),0 Compute the DTFT of x[n] for w=0:0.01:2*pi Plot the Real part, imaginary part, the amplitude and phas

Calling of Function polyval: The curve does not appear very smooth on this plot, but that is as there are only five points in the x vector. To estimate the temperature

Replacement : Replace a row by adding it to (or subtract from it) a multiple of the other row. For a given row ri, this is written as   ri  - srj →  ri Note that when r

Referring to and Showing Cell Array Elements and Attributes: Just as with the other vectors, we can refer to individual elements of the cell arrays. The only difference is tha

Illustration of Set operations: For illustration, given the vectors as shown below: >> v1 = 2:6 v1 = 2  3  4  5  6 >> v2 = 1:2:7 v2 = 1  3  5  7

Gauss, Gauss-Jordan elimination: For 2 × 2 systems of equations, there are well-defined, easy solution techniques. Though, for the larger systems of equations, finding solutio

Function strncmp: The function strncmp compares only the first n characters in the strings and ignores the rest. The initial two arguments are strings to compare, and third ar