Mercurial > octave
changeset 22216:f99c0b8cb67b
maint: merge away accidental head.
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Sun, 07 Aug 2016 04:21:14 +0100 |
parents | 0ff3bd7d2750 (diff) a4551d2b5da5 (current diff) |
children | 3ac380d46d54 |
files | |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/deprecated/mahalanobis.m Sun Aug 07 04:18:18 2016 +0100 +++ b/scripts/deprecated/mahalanobis.m Sun Aug 07 04:21:14 2016 +0100 @@ -76,13 +76,10 @@ w = (x' * x + y' * y) / (xr + yr - 2); - winv = inv (w); - - retval = (xm - ym) * winv * (xm - ym)'; + retval = sumsq ((xm - ym) / chol (w)); endfunction - ## Test input validation %!error mahalanobis () %!error mahalanobis (1, 2, 3)