This code requires the Statistics Toolbox in MATLAB.
It uses genresults.m, which is identical to that on the website aside from line calling physionet2012_F.
physionet2012_F and genresults are the core functions - the rest are subfunctions called throughout.