y = hampel(x) applies a Hampel filter to the input vector x to detect and remove outliers. For each sample of x, the function computes the median of a window composed of the sample and its six surrounding samples, three per side. It also estimates the standard deviation of each sample about its window median using the median absolute deviation. If a sample differs from the median by more than three standard deviations, it is replaced with the median. If x is a matrix, then the function treats each column of x as an independent channel.
Use hampel to locate every sample that differs by more than three standard deviations from the local median. The measurement window is composed of the sample and its six surrounding samples, three per side.
Apply a Hampel filter to the signal. Take as outliers those points that differ by more than two standard deviations from the median of a surrounding nine-sample window. Output a logical matrix that is true at the locations of the outliers.
Number of neighbors on either side of the sample xs,specified as an integer scalar. Samples close to the signal edgesthat have fewer than k samples on one side arecompared to the median of a smaller window.
c80f0f1006