Now use a few pictures to try but the error is in this part
why M= 2?
%classify test cases
for t=1:size(TestSet,1)
matched = false;
for M = 1:numClasses
if(predict(models{M},TestSet(t,: )))
matched = true;
break;
end
end
if matched
result(t,1) = u(M);
else
result(t,1) = 'No Match';
end