Documentation of where_sig


Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)


Function Synopsis

[locmax, locmin] = where_sig(x);

Help text


   [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.


Listing of function where_sig

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;