Remove cells in table if a specific value is an outlier
1 次查看(过去 30 天)
显示 更早的评论
I want to remove the complete rows of a table if the outlier in the second column which is named 'Close' is an Outlier. I used the following code but no outliers have been removed from the table.
MovingAverage = movmean(NoMV.Close,30)
threshold = 3 * std(MovingAverage);
lowerC = NoMV.Close - threshold;
upperC = NoMV.Close + threshold;
NoMV(NoMV.Close(:)<lowerC, :)=[]
NoMV(NoMV.Close(:)>upperC,:)=[]
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Hypothesis Tests 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!