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!
