Note that in Matlab, vectors are matrices of column or row shape and. A 2 by 2 matrix can only be multiplied by a column vector, not by a row vector.
x = (D(l,:)-Cnt(i,:)) is a 1 by 2 matrix ( row vector)
w is a 2 by 2 matrix, so w*x will result in an error
Maybe what you want to do is to replace the content of the innermost loop by:
x = (D(l,:)-Cnt(i,:));
dist(i) = 1/Wp*(sqrt( x*W * inv(Sigma) * W'*x'));