필터 지우기
필터 지우기

How can I get rid of outlier data in matlab?

조회 수: 2 (최근 30일)
Ege Gurtan
Ege Gurtan 2017년 8월 28일
답변: KSSV 2017년 8월 28일
My thermocouple measures temperature in a room. However sometimes it acts weirdly and suddenly it rises from 24 to numbers like 10000.
A= [23.4 24 10000 23.7 24.1 17989]
I want to replace the terms like 10000 and 17989 with their previous neighbour element. Like;
A= [23.4 24 24 23.7 24.1 24.1]
However there are 500 of them. I need a script that makes that automatically for me. For instance a script that finds these "absurd" data and replace it with the previous "non-absurd" neighbour element.

채택된 답변

KSSV
KSSV 2017년 8월 28일
A= [23.4 24 10000 23.7 24.1 17989] ;
absurdval = 100 ;
idx = find(A>absurdval) ; % Here any record greater thn 100 is absurd
A(idx) = A(idx-1) ;
In the above nay value greater then 100 will be replaced by it's previous value. YOu can fix your absurd value.

추가 답변 (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