I have outliers at the X-axis position 5785 and 7934.
outliers = 5785; 7934
In order to replace the outlying value, outliers are above mentioned points are deleted and a new 'corrected' values are created.
W(outliers) = []
x = 1:17280 % indices for x asix
x(outliers) = [] % deleting / emptying the value at the outlier position on x-axis
W_int = interp1(x',W, outliers)
How may i inserted the corrected value back in to the previously deleted position?

 채택된 답변

Tommy
Tommy 2020년 4월 11일

1 개 추천

How about simply
W = filloutliers(W, 'linear');
If you want to supply the outliers yourself:
outliers = [5785; 7934];
x = 1:numel(W);
W = filloutliers(W, 'linear', 'OutlierLocations', any(x==outliers)');

댓글 수: 1

Sehoon Chang
Sehoon Chang 2020년 4월 12일
thanks alot! you've provided me with a better answer that i was awaiting for

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

추가 답변 (0개)

카테고리

질문:

2020년 4월 10일

댓글:

2020년 4월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by