MATLAB Answers

Finding a Signal from an noisy signal

17 views (last 30 days)
I am having an signal as displayed in the image the red signal is the input and the blue one is outut as we can see that we have six peaks obtained in the input (Red) signal and the same should be present in the output (Blue) signal. I want to find the the signals in the blue samples. Is there any kind of filter or code which I can apply to find the signals.
Please note that signals attached in the image are created using an CSV file which contains the amplitudes of the signals.

  0 Comments

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 2 Sep 2019
Simply use masking:
mask = redSignal > 0.1; % Logical index (mask) of where the red signal is higher than 0.1.
% Now replace those bad red signal locations with the good blue signal:
redSignal(mask) = blueSignal(mask);

  2 Comments

Rohan  Mehta
Rohan Mehta on 3 Sep 2019
Can you just explain what this masking of signals does ?
Image Analyst
Image Analyst on 3 Sep 2019
Not sure what additional I can say. The green comment above say it all. The mask is where the red signal is higher than 0.1 (bad signal locations/indexes). And then I replace those bad red signal locations with the values from the good blue signal. Read it again and tell me where you see some ambiguity or uncertainty in what it says.

Sign in to comment.

More Answers (0)

Sign in to answer this question.