Speed up for loop, accumarray
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB Report Generator finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!