advanced code snippet search
eiger_824 on 11/11/15
function [d] = MahalanobisDistance(A,C) d = 0; C_prime = inv(C); aux = zeros(1,length(A)); aux2 = 0; for i=1:length(A) for j=1:length(C) aux2 = aux2 + A(j)*C_prime(j,i); end aux(i)=aux2; end for k=1:length(A) d = d + aux(k)*A(k); endend
Report this snippet
You need to login to post a comment.