RemoveRetrieveOutli​ers(DataIn)

Version 1.3.0.0 (6.86 KB) by Ali
This file uses Thompson Tau technique to remove outliers from a vector containing statistical data
80 Downloads
Updated 18 Dec 2016

View License

% Please input your data with any size
%REMOVEOUTLIERS Remove outliers from data using the Thompson Tau method.
% For vectors, REMOVEOUTLIERS(DataIn) removes the elements in Input data that
% are considered outliers as defined by the Thompson Tau method. This
% applies to any data vectors greater than three elements in length, with
% no upper limit (other than that of the machine running the script).
% Additionally, the Input can be with any size of vectors, it calculate
% the outliers fir each column separately.
% Additionally, the output is the original data in the original order and
% the Oulier elements are placed with Nan.
% Also, the second output is Outliers, which shows you the removed outliers.
% Example: If DataIn =[1,1;34,0;35,35;35,35;33,33;34,34;160,160;38,38;35,35;95,35;36,36;150,150;39,39;41,41;42,40;0,0;200,200];
%
% then RemoveRetrieveOutliers(DataIn) will return these vectors:
% Example: If DataIn =[1,1;34,3;35,35;35,35;33,33;34,34;160,160;38,38;35,35;95,35;36,36;150,150;39,39;41,41;42,40;3,3;200,200];
%
% then RemoveRetrieveOutliers(DataIn) will return these vectors:
% FinalDataOut=[NaN,NaN;34,NaN;35,35;35,35;33,33;34,34;NaN,NaN;38,38;35,35;NaN,35;36,36;NaN,NaN;39,39;41,41;42,40;NaN,NaN;NaN,NaN]
% Outliers=[200;160;150;95;1;3;200;160;150;1;3;3]
% See also MEDIAN, STD, MIN, MAX, VAR, COV, MODE.

Cite As

Ali (2024). RemoveRetrieveOutliers(DataIn) (https://www.mathworks.com/matlabcentral/fileexchange/60773-removeretrieveoutliers-datain), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2006a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Descriptive Statistics in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.3.0.0

Show error message if the data has lower variance and this method could not detect the outliers.

1.1.0.0

Update the function outputs.

1.0.0.0