필터 지우기
필터 지우기

How to remove outliers from data set

조회 수: 1 (최근 30일)
Katara So
Katara So 2020년 12월 17일
댓글: Star Strider 2020년 12월 17일
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!

채택된 답변

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by