Speed up for loop, accumarray
古いコメントを表示
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
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で MATLAB Report Generator についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!