Index exceeds matrix dimensions.
Error in threshold (line 13)
correctMinimum(j) = allMinimum(i);
Error in knnclassify (line 177)
[minThreshold,maxThreshold] = threshold(AVM,recognition);
Error in maintotaldemo (line 76)
predictlabel = knnclassify(P_test, P_train, train_label,3,'euclidean','nearest');
[dIndex,dista]= knnsearch(TRAIN,sample,'distance', distance,'K',K)
personsNo = 10;
test=10
for i=1:personsNo
originalTest(1,((i-1)*12)+1:((i-1)*12)+12) = i;
end
recognition = (originalTest'==test);
AVM = dista(2:40,:);
[minThreshold,maxThreshold] = threshold(AVM,recognition);
[FAR,FRR] = ROC(AVM,minThreshold,maxThreshold);
plot(FAR,FRR);
2 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/422996-following-is-the-error-in-my-program#comment_619718
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/422996-following-is-the-error-in-my-program#comment_619718
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/422996-following-is-the-error-in-my-program#comment_619722
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/422996-following-is-the-error-in-my-program#comment_619722
Sign in to comment.