How to detect at which position the signal leaves the noise level

1 view (last 30 days)
Dear Matlab fellows,
I'm handling some data where the signal is moslty due to noise in the vicinities of the 0 x-coordinate, and suddently jumps from the noise level for higher magnitudes of X (both positive and negative). An example of the usual data is presented in the photograph. Is there any tool in matlab that could read such a data and determine at which position this event occours?
Thanks in advance for any assistance.

Answers (1)

Image Analyst
Image Analyst on 25 Aug 2021
Have you tried findchangepts()? You might want to smooth it before calling findchangepts() with sgolayfilt().
Another very simple option is to threshold and use find():
indexes = x > -1 & x < 1;
meanSignal = mean(y(indexes));
sd = std(y(indexes));
topOfNoise = meanSignal + 2 * sd; % However you define it.
% Threshold to find beginning of "stable/flat" region
index = find(y < topOfNoise, 1, 'first');
x1 = x(index);
% Threshold to find end of "stable/flat" region
index = find(y < topOfNoise, 1, 'last');
x2 = x(index);

Community Treasure Hunt

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

Start Hunting!

Translated by