I am currently using knn to classify images according to their writers (problem of writer recognition). I worked on a given database that contains 150 images with 100 images for training and 50 images for testing. I've extracted the characteristics of each image and I got 2 matlab matrix: traindata.mat (size 100 * 8064) and testdata.mat (size 50 * 8064). other labels matrix that contains the class of image (size image 100 * 1)
I use knn to classify images using this code:
load('traindata.mat')
load('testdata')
load('labels')
class=knnclassify(testdata,traindata,labels)
I got this error message:
Undefined function or variable 'testdata'.
Error in Untitled2 (line 4)class=knnclassify(testdata,traindata,labels)
please someone help me to solve this problem and thank you in advance
testdata
is not called testdata. – Ander Biguri