function D = pdist2( mX,mY, metric )if( nargin<3 || isempty(metric) ); metric=0; end;switch metric case {0,'sqeuclidean'} D = distEucSq( X, Y ); case 'euclidean' D = sqrt(distEucSq( mX, mY )); case 'L1' D = distL1( mX, mY ); case 'cosine' D = distCosine( mX, mY ); case 'emd' D = distEmd( mX, mY ); case 'chisq' D = distChiSq( mX, mY ); otherwise error(['pdist2 - unknown metric: ' metric]);end
MATLAB: Function D = pdist2( X, Y, metric ) ↑ Error: Function definition not supported in this context. Create functions in code file.
unrecognized fuction or variable x
Best Answer