A = rand(1, 100);B = rand(1, 100);w = 0;for i = 1:length(A) w = w + A(i).*B;end
MATLAB: Is it possible to vectorize this loop
for loopvectorization
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