title: How to implement Knn in Matlab?
body: <p>I've to implement k-nearest neighbor algorithm in Matlab by using <a href="http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data" rel="nofollow">the iris data</a>.<br>
  There are 3 types of flowers and each contains 50 samples. I need to take 1st 25 samples of each class as training data and last 25 as training data.<br>
  I've tried some sites and methods but nothing has worked not even <code>fitcknn</code> - Matlab built-in function always give this error:  </p>
  
  <blockquote>
    <p>??? Undefined function or method 'fitcknn' for input arguments of type 'cell'.</p>
  </blockquote>