Vector Matrix multiplication (Row wise)
129 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kamuran
am 16 Sep. 2015
Kommentiert: Sanders
am 17 Dez. 2024
Hi, I need to multiply each row of very large matrix with a row of corresponding vector. I don't really want to use for loop for that, i.e.,
N=15000;
L=rand(N,N); V=rand(N,1);
for i=1:1:N
L(i,:)=V(i)*L(i,:);
end
is it possible to do this in vectorized way?
Thank you
Erdem
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (3)
Siehe auch
Kategorien
Mehr zu Logical 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!