Daniel@0: function D = distanceDiag(W, X) Daniel@0: Daniel@0: D = PsdToEdm(X' * bsxfun(@times, W, X)); Daniel@0: end