   distances finds the squared distances in an intermediate step, so this
   calculation is faster than returning the Euclidean distance proper.

   DISTS = PAIRDIST(..., 'reuse') attempts to reuse memory from an
   earlier call to PAIRDIST.  When DISTS is a large matrix, the resulting
   time savings can be significant.  However, this option can result in
   unexpected Matlab behavior for the returned variable DISTS.  In
   particular, clearing DISTS in the calling workspace will not release
   the memory 