How to vectorize double sum
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Esegboria Osarhemen
am 9 Feb. 2019
Kommentiert: Esegboria Osarhemen
am 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 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!