function [nCorrect] = ClassifySamples(samples, labels)

% information need to compute distance measures
m1 = [6; 3]; m2 = [5; 3.5];

% initialise the vector used to store the predicted classes
predictedClass = zeros(1, length(samples));

for i=1:length(samples)

    s = samples(:, i);

    % find the distances from s to m1, and from s to m2
    % [ you can replace norm() with the function of your choice ]
    d = [ norm(s-m1), norm(s-m2)];

    % for the distance meaures, we choose the class which has the 
    % MINIMUM value of d
    if d(1)<d(2)
        predictedClass(i) = 1;
    else
        predictedClass(i) = 2;
    end
        
end

% how many predicted classes were correct?
nCorrect = sum(predictedClass == labels);

end







