Multiplying 2 matrices together
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
James Tursa
il 8 Apr 2020
Modificato: James Tursa
il 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 Commenti
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!