annotate evaluation/countElementOccurences.m @ 36:4af6fc2100e8

update evaluation scripts and ignore all image files
author DaveM
date Sat, 01 Apr 2017 16:57:31 +0100
parents
children
rev   line source
DaveM@36 1 function [LU,occ] = countElementOccurences(L)
DaveM@36 2
DaveM@36 3 LU = unique(L);
DaveM@36 4 occ = zeros(length(LU),1);
DaveM@36 5
DaveM@36 6 for i = 1:length(L)
DaveM@36 7 for ii = 1:length(LU)
DaveM@36 8 if(strcmp(L{i}, LU{ii}))
DaveM@36 9 % fprintf('L= %s, LU= %s \n',L{i},LU{ii});
DaveM@36 10 occ(ii) = occ(ii) + 1;
DaveM@36 11 end
DaveM@36 12 end
DaveM@36 13 end
DaveM@36 14
DaveM@36 15 end