MATLAB: I am unable to use KMEANS function

errorkmeansStatistics and Machine Learning Toolbox

i am using matlab 2010b version and i am unable to use the KMEANS function in my programs. whenever i call the KMEANS function in my program i get the following error
  • * *??? Attempt to execute SCRIPT kmeans as a function:C:\Users\swathi.swathi-PC\Documents\MATLAB\kmeans.m
Error in ==> kmeans at 40 idx = kmeans ( x, k );* * * kindly help me out .

Best Answer

Looks like you have multiple "kmeans" on the path.
which kmeans -all
Probably rename the kmeans.m from the path in your question?
Related Question