Code covered by the BSD License  

Highlights from
MATLAB Contest - Wiring

image thumbnail
from MATLAB Contest - Wiring by The MATLAB Contest Team
All the files needed to develop and score an entry for the MATLABĀ® Programming Contest.

grade(B,W)
function score = grade(B,W)

% Copyright 2008 The MathWorks, Inc.

if size(W,2)~=4 || ~isnumeric(W) || ~isreal(W)
    error('W must be a numeric and real matrix with 4 columns')
end
[ro,co] = size(B);
if any(any(W(:,[1 3])>ro)) || any(any(W(:,[2 4])>co)) || any(any(W<1))
    error('At least one segment in W goes out of limits')
end
score = concom(B,W);

Contact us at files@mathworks.com