Edge Finding Program to Fix Data?
1 view (last 30 days)
Show older comments
I am looking at data that has a "bit flip" error (see image below). Is there a solution I could execute in Matlab like an edge finding program to correct these errors in my various data sets? Thank you.

1 Comment
Image Analyst
on 21 Dec 2018
Is the green, filtered line the desired signal, and the blue one is the "bad" one that needs to be turned into the green one? If so, how are we supposed to know which peak to turn upside down and which to leave alone? And how much to shift the data vertically? I see a down shift of 1.5 units from the blue to the green.
Attach your data with the paper clip icon if you need more help.
Answers (1)
Star Strider
on 21 Dec 2018
It appears that the discontinuities in the blue line near the regions you likely want to ‘correct’ (if I understand your Question) are the minimum values of those data. Probably the easiest way to find them is to use the Signal Processing Toolbox findpeaks (link) function with an inverted (negated) signal. Don’t worry about the negation, since you want the indices (the second ‘locs’ output). Another option is the islocalmin (link) (R2017b and later) function.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!