필터 지우기
필터 지우기

What is the toolbox for kmeans?

조회 수: 6 (최근 30일)
Enrica Brunetti
Enrica Brunetti 2019년 6월 17일
댓글: Steven Lord 2019년 6월 17일
What is the toolbox to obtain kmeans as a function? I have these toolboxes: 'Deep learning toolbox, Statistics and machine learning toolbox, Image processing toolbox', but Matlab doesn't find kmeans as a function. Why??

채택된 답변

Steven Lord
Steven Lord 2019년 6월 17일
The kmeans function is in Statistics and Machine Learning Toolbox (previously the Statistics Toolbox) and has been since at least release R2006a. Do you have this toolbox both installed and licensed? [If you're in an environment where you share licenses with others in your institution, all the licenses may be in use when you try to use kmeans.]
Can you clarify what you mean by "Matlab[sic] doesn't find kmeans as a function"? Does it throw an error (and if so what is the full and exact text of that error -- show us all the text displayed in red?) Does it issue a warning? Does it do something else?
  댓글 수: 2
Enrica Brunetti
Enrica Brunetti 2019년 6월 17일
If I write 'help kmeans' in the command window:
>> help kmeans
No help found for kmeans.m
Or if I do run with a script that uses kmeans: in the command window appear this in red:
Attempt to execute SCRIPT kmeans as a function:
C:\Users\Enr\Documents\MATLAB\kmeans.m
Error in ex (line 27)
[idx,C] = kmeans(X,K);
Steven Lord
Steven Lord 2019년 6월 17일
You've written your own kmeans.m file that's shadowing the function included in Statistics and Machine Learning Toolbox. Rename or delete your kmeans.m and you should be able to use the one from the toolbox.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by