MATLAB: Is it possible to vectorize this loop

for loopvectorization

A = rand(1, 100);
B = rand(1, 100);
w = 0;
for i = 1:length(A)
w = w + A(i).*B;
end

Best Answer

w_new = (sum(w + A.*B(:),2))';