help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fastest way to element-by-element multiply matix by vector?


From: Michael Creel
Subject: fastest way to element-by-element multiply matix by vector?
Date: Tue, 19 Jun 2007 15:28:54 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

Hello all,
I need to element-by-element multiply an nXk matrix A by an nX1 vector b, so that the result is that each row of A is multiplied by the corresponding row of b. This is on the inside loop of some intense calculations, so I'd like the best performance. Is C = A .* repmat(b,1,k) the best way to do this?
Thanks, Michael


reply via email to

[Prev in Thread] Current Thread [Next in Thread]