Is it possible to detect and replace abnormal/wrong numbers in an array?
이전 댓글 표시
I have a dataset which is an array containing values, and which are plotted in the figure below. A section of the array for the figure is: A = [.... 25.9, 25.9, 26.2, 27, 28, 29, 29.3, 29.6, 3, 30.4, 30.5, 30.4, 30.3, 30.3, ....]; Here is number 3 an abnormality in the array. Is it possible to detect these abnormal numbers and replace them with the average value of the number before and after? So for the number 3 in A I want it to be (29.6+30.4)/2.

채택된 답변
추가 답변 (1개)
Walter Roberson
2019년 3월 20일
0 개 추천
댓글 수: 2
Rikke
2019년 3월 20일
Chris Turnes
2019년 3월 21일
You may also be interested in the filloutliers function, which lets you not only identify outliers but replace them as well.
카테고리
도움말 센터 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
