I have A(2000×5000). I need to perform the following:
P1 = A(:,1)*A(:,1)'; for i=2:5000 P1 = P1 + AA(:,i)*A(:,i)' end
What is the most efficient way to do above? It takes so much time to do it right now due to size of the arrays.
efficient matrix multiplicationop_has_left_the_building
P1 = A(:,1)*A(:,1)'; for i=2:5000 P1 = P1 + AA(:,i)*A(:,i)' end
Best Answer