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
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

Binary Search: The binary search supposes that the vector has been sorted first. The algorithm is just similar to the way it works whenever looking for a name in a phone direc

str2num function - String: The function str2num does the opposite; it takes the string in which a number is stored and converts it to the type double: >> num = str2num('123.

Application: Menu driven Modular Program Numerous longer, more involved programs which have interaction with the user are menu-driven, that means that the program prints a men


Finding products by for loop: an illustration, when 5 is passed to be the value of the input argument n, the function will compute and return 1 + 2 + 3 + 4 + 5, or 15: >> s

Cross Product: The cross or outer product a × b of two vectors a and b is defined only whenever both a and b are the vectors in three-dimensional space, that means that they b

Example of modular program: In a modular program, there would be one main script which calls three separate functions to complete these tasks: A function to prompt an us

Algorithm for subfunction: The algorithm for subfunction askforn is as shown:  Prompt the user for the positive integer n.  Loop to print an error message and reprom

Illustration sorting vectors of structures: This function sorts the structures depend only on the price field. A more common function is shown next, that receives a string whi