필터 지우기
필터 지우기

Handle function in pdist2

조회 수: 1 (최근 30일)
l.l.
l.l. 2014년 10월 20일
댓글: Jan 2014년 10월 20일
I have a problem with an handle function used in pdist2 function. Distance function mydistance(l1, l2) wants l1 1xn and l2 1xn vector. So, I would like to use it for a matrix A mxn and to know all possible distances between different rows.
this syntax does not work:
weuc=@mydistance;
D=pdist2(A, A, @(Ai, Aj) weuc(Ai, Aj));
the result is:
Error evaluating distance function '@(Ai,Aj)weuc(Ai,Aj)'
How can I do?
  댓글 수: 1
Jan
Jan 2014년 10월 20일
Please copy the complete error message.

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

답변 (0개)

카테고리

Help CenterFile 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!

Translated by