Removing outliers from Control System response?

5 visualizzazioni (ultimi 30 giorni)
How to remove outliers from a data set that looks like the one pictured?
The data is response of a PID system that will occasionally place a random zero in the output
I cannot remove all zeroes from graph as occisionally system response will actually be zero.
If X is the dataset i know the code will look something like:
I just do not know the proper method to use this function

Risposte (2)

Benjamin Campbell
Benjamin Campbell il 14 Nov 2022
It would be best to find the cause of these spurious zero's first, but, if that is not possible to fix - if it is external data or something. An approximate method could be to go through all zeros, and if there is a zero either side to leave it, and if there is a non-zero on both sides to remove it (or make it the average of whatever is either side)

cr il 14 Nov 2022
Check this out.


Community Treasure Hunt

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

Start Hunting!

Translated by