Preconditioning Functions |
filterNaN(v) Takes a vector or matrix v and trims any rows containing a NaN.
Using filterNaN is equivalent to using matchNaN followed by the trim function, but concatenates them into one step.
markNaN(v, vindex) Takes a complex vector or matrix v and a vector of indices vindex given either as integers or nested 2 x 1 matrices specifying elements in v. The contents of each element specified by vindex in v is changed to contain a NaN. The indices specified in vindex are relative to ORIGIN.
matchNaN(v) Takes a vector or matrix v, and returns the index or pair of indexes of the NaN entries. The indexes returned are relative to ORIGIN.
Scale(M, min, max) Takes a real matrix M and real scalars min and max, and scales the data between these values.
Grubbs(v, a) Takes a real vector v and a probability 0 < a < 1, and returns a three column matrix containing the index of suspected outliers, the Grubbs test statistic for that outlier, and its distance from the critical statistic.
This function can also take a real matrix M in place of a vector, in which case it returns the pair of indices for each outlier candidate in the first column as nested matrices.
GrubbsClassic(v, a) Takes a real vector v and a probability 0 < a < 1, and returns a 1 x 3 vector containing the index of the single point most likely to be an outlier, the Grubbs test statistic for that outlier, and its distance from the critical statistic.
This function can also take a real matrix M in place of a vector, in which case it returns the pair of indices for the outlier candidate in the first column as a nested matrix.
ThreeSigma(v) Takes a real vector or matrix v and returns a two column matrix containing the index of points whose mean divided by standard deviation is greater than three and the value of this quantity for each point.
This function can also take a real matrix M in place of a vector, in which case it returns the pair of indices for each outlier candidate in the first column as nested matrices.
trim(v, vindex) Takes a complex vector or matrix v, and trims out the entries (rows) specified by integer-valued vector vindex. The indices specified in vindex are relative to ORIGIN.
VSmooth(v, w) Takes a vector of complex data v and a vector of (or a single) window-widths, w, and repeatedly median smooths data until no additional change has occurred for each window width. Convergence of the smoothing depends on TOL. Elements of w must be non-negative, odd integers smaller than the length of v.