A reccursive kmeans implementation for matlab.