필터 지우기
필터 지우기

Can not run a modified kmeans.m

조회 수: 1 (최근 30일)
Jeff
Jeff 2013년 10월 21일
댓글: Jeff 2013년 10월 22일
I modified the original kmeans.m function in order to carry out certain experiment.I removed the part that handles empty cluster(s) and left other parts as they were.
The problem is at first I put the new kmeans_mod.m in my workspace and ran it, an error was reported saying 'undefined function statremovenan for input type single ....' (statremovenan is a function used in kmeans.m and I didn't have this error when I ran original kmeans.m). Then I thought maybe the script should be put in the toolbox/stat/stat/, so I did and ran again, this time another error was shown saying 'undefined function kmeans_mod for input type struct....', looks like the modified function was not recognised at all.
Any suggestion why would this happen and how to fix it? Thanks a lot!

채택된 답변

Walter Roberson
Walter Roberson 2013년 10월 22일
rehash toolbox
after putting it in the appropriate toolbox directory
  댓글 수: 1
Jeff
Jeff 2013년 10월 22일
Solved.Thank you!
Also I wonder if I put the modified function in my workspace instead of toolbox directory, how to avoid errors when it calls internal functions like statremovenan? (Certain machine doesn't allow modification in toolbox directory)
Thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by