Azzera filtri
Azzera filtri

How to remove outliers from data set

1 visualizzazione (ultimi 30 giorni)
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!

Risposta accettata

Star Strider
Star Strider il 17 Dic 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 Commenti
Katara So
Katara So il 17 Dic 2020
Yes, that worked perfect! Thank you so much!
Star Strider
Star Strider il 17 Dic 2020
As always, my pleasure!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by