how to multiply three matrices that results in a single value.

4 次查看(过去 30 天)
I am having three matrices:
A=[1 2 3];
B=[4 5 6];
C=[7 8 9];
I need to multiply all the three matrices such that the result should be single value .
Note : Inverse of the matrices can also be used.

回答(2 个)

madhan ravi
madhan ravi 2020-9-11
(A .* B) * C(:) % if it makes any sense?

Asim Riaz
Asim Riaz 2020-9-11
But to multiply a matrix by another matrix we need to do the "dot product" of rows and columns ... what does that mean? Let us see with an example: To work out the answer for the 1st row and 1st column: Want to see another example? Here it is for the 1st row and 2nd column: (1, 2, 3) • (8, 10, 12) = 1×8 + 2×10 + 3×12 = 64 We can do the same thing for the 2nd row and 1st column: (4, 5, 6) • (7, 9, 11) = 4×7 + 5×9 + 6×11 = 139 And for the 2nd row and 2nd column: (4, 5, 6) • (8, 10, 12) = 4×8 + 5×10 + 6×12 = 154

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by