Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

EuclideanDistancesMat.m 219 B

123456789101112
  1. function distMat = EuclideanDistancesMat (X,Y)
  2. nx = size (Y, 2);
  3. ny = size (X, 2);
  4. ySq = sum (Y .* Y);
  5. xSq = sum (X .* X)';
  6. distMat = repmat (ySq, ny, 1) + repmat (xSq, 1, nx) - 2 * X' * Y;
  7. distMat(distMat < 0)=0;