Can I write a script that keeps rows that are within 5% and 10 cells above and below a specific cell?
1 view (last 30 days)
The idea is to have a script that takes stable data eleminating the peaks and valleys.
I want to have that cell compared with the 10 before and after itself and if all this 21 values are within 5% then I can keep that data. That script should also be able to check all the rows of an excel spreadsheet.
Any suggestions and ideas are much appreciated! I am a newby trying to do advanced stuff :)
Rik on 21 Aug 2019
If you have a cell array you should convert it to a numeric type (e.g. a double).
You can find outliers by using the movmean function:
Now you have a logical array with the outliers. Do you want to remove them or replace them?