|
From: | marco atzeri |
Subject: | Re: A vectorization question |
Date: | Tue, 20 Dec 2011 11:07:11 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
On 12/20/2011 10:53 AM, wrote:
Hi, Is there a way of getting rid of this loop in for j=1:n B(:,j)=c(j) * A(:,j); endfor where c is a n-vector and A is a m by n matrix? Regards, ST
Am I missing something or it is just a standard matrix multiplication ? B=A*c or use c' depending if its size is nx1 or 1xn Marco
[Prev in Thread] | Current Thread | [Next in Thread] |