Error when using kmedoids with custom distance function
이전 댓글 표시
Hi,
I created a custom distance function which I used with linkage and it worked fine. Here is how I call it: Z = linkage(matrix_clean,'average','@new_dist');
When I try using kmedoids (from the stats toolbox) with a custom fucntion I get an error. Here is how I call the fucntion: [idx,C,sumd,d,midx] = kmedoids(matrix_clean,2,'Distance','@new_dist');
Here is the error:
Error using lower Not enough input arguments.
Error in kmedoids (line 242) distance = lower(methods{i});
How should I pass in my custom distance function in kmedoids?
Thanks,
Daniel
댓글 수: 1
Geoff Hayes
2014년 10월 16일
Daniel - if this happens again, in the Command Window, type
which lower -all
Perhaps you have a custom function named lower that requires more than one input parameter and so is causing some confusion with the built-in MATLAB lower function.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Design of Experiments (DOE)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!