Euclidian distance, undefined subjects set to zeroes