Speed up for loop, accumarray
Mostra commenti meno recenti
I would like to speed up my two for loop with accumarray (I have old version of MatLab and I've read on internet that accumarray will speed up my operation)
if true
for i = 1:size(img, 1)
for j = 1:size(img, 2)
R = idx(i, j, 1);
G = idx(i, j, 2);
B = idx(i, j, 3);
H(R,G,B) = H(R,G,B) + 1;
end
end
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su MATLAB Report Generator in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!