Code covered by the BSD License  

Highlights from
MATLAB Contest Statistics

image thumbnail
from MATLAB Contest Statistics by Matthew Simoneau
The code used to generate the "Statistics" page for the MATLABĀ® Contest.

mostActive(s)
function mostActive(s)
[uniqueAuthors,i,j] = unique({s.author});
authorCount = hist(j,min(j):max(j));
[sortedAuthorCount,iSortedAuthorCount] = sort(authorCount);
sortedAuthors = uniqueAuthors(iSortedAuthorCount);
num = 25;
barh(sortedAuthorCount(end-num:end))
set(gca,'YTickLabel',sortedAuthors(end-num:end),'YTick',1:num+1)
set(gca,'Units','Normalized')
set(gca,'GridLineStyle','-','XGrid','on')
%set(gca,'Position',[0.25 0.11 0.7 0.815])
axis tight
title(sprintf('Most Active Participants (top 25 of %.0f)',length(uniqueAuthors)))
xlabel('number of entries')

Contact us at files@mathworks.com