Removing highest and lowest 5% of data as outliers using prctile
25 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Shervin Safineh
el 2 de Nov. de 2020
Comentada: Nicholas Omoding
el 11 de Jul. de 2021
I have some numerical data imported from an Excel sheet in a column. I want to remove the highest 5% and the lowest 5% of these numbers as outliers using the prctile function. How can I do this?
Thanks in advance!
0 comentarios
Respuesta aceptada
Jeff Miller
el 2 de Nov. de 2020
% Data values are in X; X2 holds remaining values after outliers removed
Y = prctile(X,[5,95]);
X2 = X(X>Y(1) & X<Y(2)); % maybe you want >= and <=, depending on your definition of outlier
1 comentario
Nicholas Omoding
el 11 de Jul. de 2021
I’ve surface damage depth (D) for 3D points (x, y, z). I’d like remove top and bottom 5% of the D values with their corresponding (x, y, z) from the matrix so that I can plot the remaining 90% of the points. Based on the attached sub set of the data, please kindly assist on the based way to achieve this.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!