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.

final(scoreResults,timeResults,complexity)
function contestScore = final(scoreResults,timeResults,complexity)
% FINAL Calculates the overall entry score based on results, time, 
% and complexity.

if nargin < 3
  complexity = 0;
end

% Contants for jumping.
k1 = 1/10; % Shift, range
k2 = 2; % Scale, timing influence
k3 = 1/20; % Shape, elbow influence
k4 = 1; % complexity influence
k5 = 10; % complexity threshhold

contestScore = k1*scoreResults + k2*exp(k3*timeResults) + k4*max(complexity-k5, 0);

Contact us at files@mathworks.com