Multiplying 2 matrices together
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to multiply 2 matrices together. One has dimensions 50x41472 and the other has dimensions 41472x50.
I know that for multiplication to work, the inner numbers must be the same, which they are since 41472=41472.....
Also the resulting matrix will have dimensions of the outer numbers, 50x50 which is the order of the matrix that I need
for what I'm doing. However, when I try and do this calculation in matlab, I get the error message "Matrix dimensions
must agree", which doesn't make any sense because they do agree... is the problem that matlab just can't handle an
operation of this size? How can I fix this? Thanks for any help!
This is the exact code I have; the matrices V_row and V_col are already defined in my kernel, so that is not the problem.
V = V_row.*V_col
0 Kommentare
Antworten (1)
James Tursa
am 8 Apr. 2020
Bearbeitet: James Tursa
am 8 Apr. 2020
Use the matrix multiply operator * without the dot. What you are using is the element-wise multiply operator .* with the dot. Two different operators.
V = V_row*V_col
0 Kommentare
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!