Borrar filtros
Borrar filtros

How to remove outliers from data set

1 visualización (últimos 30 días)
Katara So
Katara So el 17 de Dic. de 2020
Comentada: Star Strider el 17 de Dic. de 2020
I have the data set:
flintLead=[0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 ...
4 4 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 8 8 9 10 10 11 13 18 20 21 22 29 43 43 104];
And I want to do one calculation using the whole set and one where I remove the points 20 and 104, but I don't know how to remove just those two points. I thought about doing something like:
without_ouliers = flintLead(1:64, 64:70)
but that's clearly not how it is done. Could someone explain how to remove them? All help is appreciated!

Respuesta aceptada

Star Strider
Star Strider el 17 de Dic. de 2020
Try this:
flintLead=[0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 ...
4 4 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 8 8 9 10 10 11 13 18 20 21 22 29 43 43 104];
flintLead = flintLead(~((flintLead == 20) | (flintLead == 104)))
.
  2 comentarios
Katara So
Katara So el 17 de Dic. de 2020
Yes, that worked perfect! Thank you so much!
Star Strider
Star Strider el 17 de Dic. de 2020
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by