Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

# distmat 1.0

Date Added: August 19, 2013  |  Visits: 396

D = DISTMAT(X,Y) for matrices X and Y returns the distance matrix where the (i,j)th entry is the d-norm distance between the ith and jth row of X and Y respectively.DISTMAT(X,Y,d) computes a specific d-norm distance. Default=2[D,XI,YI]=DISTMAT(X,Y,d,var) gives the indices of the sorted values of matrix D depending on var ('ascend' or 'descend') in relation to both X and Y.EXAMPLE:X=[5 1; 8 1; 1 9];Y=[7 1; 1 1]; [D,XI,YI]=DISTMAT(X,Y)D=[2 4; 1 7; 10 8]XI=[1 2; 1 2; 2 1]YI=[2 1 3; 1 2 3] The distance between X(3,:)=[1 9] and Y(2,:)=[1 1] is D(3,2)=8Starting with Y(1,:) from smallest to largest distance away is X([2 1 3],:)

 Requirements: No special requirements Platforms: Matlab Keyword: 10 8xi3d1,  And Y23d1,  Ascend,  Away Is,  Between The,  Between X33d1,  Default Dxiyi Ddistmatxydvar,  Depending,  Descend,  Distance,  Distmatxy,  Gives The,  Ijth Entry,  Indices,  Is The,  Jth,  Relation,  Starting,  Yexamplex Users rating: 0/10