필터 지우기
필터 지우기

How to Delete entries for which the mid-quote deviated by more than 10 mean absolute deviations from a rolling centered median (excluding the observation under consideration) of 50 observations (25 observations before and 25 after).

조회 수: 2 (최근 30일)
I have a cell array of midquotes split on days. I need to Delete entries for which the mid-quote deviated by more than 10 mean absolute deviations from a rolling centered median (excluding the observation under consideration) of 50 observations (25 observations before and 25 after) for EACH DAY. How to do it with R2016a.

답변 (1개)

KSSV
KSSV 2019년 1월 7일
Let A be your data vector, which has outliers and you want to remove:
idx = abs(A - mean(T)) > 3*std(T); % get indices
A(idx) = [] ; % remove them
YOu can run a loop or use Cellfun to use the above lines of code to remove outliers in a cell.
  댓글 수: 4
NS
NS 2019년 1월 7일
I have a cell array A which is indexed to DATETIME index idx and i need to perform this function on 8th column of each cell of cell array . I ran this code and got Index exceeds matrix dimension error .
[idx1] = cellfun(@(x){abs(x - mean(x) > 3*std(x))},A(:,8),'UniformOutput',false);
Kindly help how to remove the outliers from each cell within this code ?

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

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by