MATLAB: How to multiply the following

matrix multiplication

Hi,
I need a code that multiplies each row of A one by one with each row of B (with corresponding element) and then sums the result. The resulting matrix has to be 3×3. This is easier to explain with an illustration. For example the first element of the resulting matrix would be equal to 0.06(0.02) + 0.16(0.03). The second element in the first row would be 0.06(0.09) + 0.16(0.14) and so on.
I am confused whether I have to use a loop for this or if there is a simper way. Note that my dataset is larger. Thanks in advance.

Best Answer

result = A*B.';