ourMELONS/matlab/spatial/private/computeDiffInCounts.m
2019-12-16 16:47:21 +01:00

7 lines
309 B
Matlab

function [counts sumcounts] = computeDiffInCounts(rows, data, nLetters)
% calculate the counts of the given rows of the data (ninds*nLoci)
% nLetters is the maximum number of different symbols over all loci
% Lu Cheng, 25.05.2011
counts = histc(data(rows,:),1:nLetters,1);
sumcounts = sum(counts,1)';