MATLAB: Question about KNN and how to use it.

knn

Hello,
I need to use KNN in matlab to find some results.
I have data in .mat that has this kind of information(training data)
1|232|34|21|542|
2|32|333|542|32|
and so on.
Then i have a second information that i will gather thro the aplication but i will only get let say
a=10|343|543|43|23
So now my question is do i only need to do is something like this http://www.mathworks.com/help/toolbox/stats/classificationknnclass.html
Best regards.

Best Answer

Take a look at the User Guide for k-NN classification: http://www.mathworks.com/help/toolbox/stats/bsehyju-1.html
In your case, the fruit code would be the class label Y and the 3 RGB numbers and roundness would be predictors X.
If you are stuck, follow up with a specific question.