diff --git a/toolbox/multivariate/mcd.m b/toolbox/multivariate/mcd.m index 1b0ae6d11..91cdc4fde 100644 --- a/toolbox/multivariate/mcd.m +++ b/toolbox/multivariate/mcd.m @@ -1410,7 +1410,7 @@ % Fraction of observations whose covariance determinant will be % minimized. If a percentage alpha=1-h/n of units are trimmed by % the mcd, it is 1-alpha. - alphacompto1 = h/n; + alphacompto1 = round(h/n,2); if nargin<4 || isempty(nu) || nu == 0 % This is the standard case, applied when uncontaminated data diff --git a/toolbox/utilities_stat/msdcutoff.m b/toolbox/utilities_stat/msdcutoff.m index 5352edce2..fdbe4f863 100644 --- a/toolbox/utilities_stat/msdcutoff.m +++ b/toolbox/utilities_stat/msdcutoff.m @@ -140,7 +140,7 @@ %% Beginning of code -if nargin < 3 || isempty(nu) +if nargin < 3 || isempty(nu) || nu == 0 cutoff=chi2inv(conflev,v); else cutoff = (1 - betainv(conflev,v/2,nu/2))^(-1);