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