Fill outliers without a loop for each rows

1 回表示 (過去 30 日間)
Ahmet Hakan UYANIK
Ahmet Hakan UYANIK 2022 年 10 月 20 日
回答済み: David Hill 2022 年 10 月 20 日
Hello everybody,
I have a matrix e.g 45500x24, and for each row, I would like to check the outliers and fill with the nearest non-outlier value.
Normally I have been doing,
for i=1:length(matrix)
matrix(i,:) = filloutliers(matrix(i,:),"nearest","median")
end
Not sure if it is the correct way but it surely takes so much time. Do you have any optimal way?

採用された回答

David Hill
David Hill 2022 年 10 月 20 日
Try this:
matrix= filloutliers(matrix,'nearest','median',2);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCurve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by