Error while using pdist function
이전 댓글 표시
X=[1,1;2,2;3,3]
D = pdist(X,Distance)
#This command shows the following error:
Unrecognized function or variable 'Distance'.
Did you mean:
>> D = pdist(X,distance)
#If i try running with distance, the following error is displayed:
Error using distance
Not enough input arguments.
What is the correct way to use distance?
답변 (1개)
You cannot use whatever the word you want. There are specified words which are methods of getting the distance.
X=[1,1;2,2;3,3]
D = pdist(X,'euclidean')
카테고리
도움말 센터 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!