function [numg] = numGroups2d(M); % NUMGROUPS(M) --- Finds the number of groups in a standard array 'M', including % groups of one (i.e. stragglers). This is simply the first output of the % findgroups2d function. numg = findGroups2d(M);