Code covered by the BSD License  

Highlights from
Who has the most children?

image thumbnail
from Who has the most children? by Ned Gulley
What can we say about entries that have a lot of children?

findleaders(d)
function bestIndexList = findleaders(d)
%FINDLEADERS Find the leader, given the data structure
%   bestIndexList = findleaders(d)

best = d(1).score;
bestIndexList=1;
for n=1:length(d),
    if d(n).score < best,
        best = d(n).score;
        bestIndexList=[bestIndexList n];
    end
end

Contact us at files@mathworks.com