SumCentroidsDistances.m 379 B

123456789101112131415161718
  1. function [ DistVec ] = SumCentroidsDistances( DistMat, iXQ )
  2. %SUMCENTROIDSDISTANCES Summary of this function goes here
  3. % Detailed explanation goes here
  4. Ntrain=size(iXQ,2);
  5. mm=size(DistMat,2);
  6. DistVec=zeros(1,Ntrain);
  7. for kk=1:Ntrain
  8. dxtmp=0;
  9. for rr=1:mm
  10. dxtmp=dxtmp+DistMat(iXQ(rr,kk),rr);
  11. end
  12. DistVec(kk)=dxtmp;
  13. end
  14. end