Remove outliesrs (matlab2016b)

2 visualizzazioni (ultimi 30 giorni)
Christina Geo
Christina Geo il 25 Set 2021
Risposto: Star Strider il 25 Set 2021
Hello,
I would like to find and remove outliers from a matrix but I use matlab2016b so i don't have rmoutliers. My matrix is A(1469,8) and i want to find outliers and remove them by column. I tried to build the equation. I tried the code below but there are 2 problems
1)The result of isOutlier(1469,8) is not right because are all zeros so I think that doesn't do the math by column.
2) The result of index is a double (11752,1) insted of a matrix with 8 columns
Any idea?
isOutlier = abs(A) > -3/(sqrt(2)*erfcinv(3/2))*median(abs(A - median(A)));
index=find(isOutlier==0);
A=A(index);

Risposte (1)

Star Strider
Star Strider il 25 Set 2021
If you have the Signal Processing Toolbox, the hampel function (introduced in R2015b) could do what you want. Check your own R2016b documentation for it, since it could have changed in the last 5 years, and the R2021b documentation I linked to may not strictly apply.)
(I added the Products and Release information in their respective windows. Expand the Products entries if necessary.)
.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by