How to vectorize double sum
    2 views (last 30 days)
  
       Show older comments
    
    Esegboria Osarhemen
 on 9 Feb 2019
  
    
    
    
    
    Commented: Esegboria Osarhemen
 on 9 Feb 2019
            Please how can i vectorize this double sum
N=4
x=randn(3,N);
for i=1:N-1
    for j=2:N
        if j>i
            a=x(:,i)-x(:,j)
        end
    end
end
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
				Find more on Loops and Conditional Statements in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!