Global Index (short | long) | Local contents | Local Index (short | long)
[locmax, locmin] = where_sig(x);
[locmax, locmin] = where_sig(x); locmax = locations where individual values of x exceed the mean of x at a 95% (two-tailed) level. locmin = locations where individual values of x are below the true mean of x at the 95% (two-tailed) level.
function [locmax, locmin] = where_sig(x); [m,n]=size(x); if n == 1; x = x'; mm = m; m = n; n = mm; clear mm; end; stdx = std(x); minsig = mean(x) - 2.35*stdx/sqrt(n - 1); maxsig = mean(x) + 2.35*stdx/sqrt(n - 1); locmax = []; locmin = []; for i=1:n if x(i) > maxsig; locmax = [locmax i]; end; if x(i) < minsig; locmin = [locmin i]; end; end;