function [M, cluster] = dbrec(pIdx, M, Eps, MinPts, cluster) for i=1:size(M,1) if(norm(M(i,:) - M(pIdx,:)) < Eps && cluster(i) == 0) cluster(i) = cluster(pIdx); dbrec(pIdx, M, Eps, MinPts, cluster); end end