Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Suggest a filter to remove the noise from the signal

Asked by Gova ReDDy on 18 Sep 2013
Latest activity Commented on by Image Analyst on 20 Nov 2013

Can someone suggest a filter to remove the noise from the signal shown in this image (with the sampling rate being 500)?


Jan Simon on 18 Sep 2013

As usual I do not see anything on tinypic.

Jan Simon on 18 Sep 2013

On imageshack I see a large banner in the foreground, which wants me to click on a "Enter to win" button, as far as I understand. The small [x] on the top right does not close the banner. I hate such stuff.

@GovaReDDy: It is not your fault. TMW hsitates for years to allow storing pictures on their server. But this is the only location where pictures concerning the forum should be hosted.

Gova ReDDy


2 Answers

Answer by Image Analyst on 19 Sep 2013
Accepted answer

I'd try a modified median filter

% Take median filter.
medianFilteredSignal = medfilt2(signal, [1,3]);
% Find where signal is bad
badElements = signal < 400 | signal > 900;
% Replace bad elements with median filtered values.
noiseFreeSignal = signal; % Initialize.
noiseFreeSignal(badElements) = medianFilteredSignal(badElements); % Do the replacement


Image Analyst on 22 Sep 2013

I'd recommend you upgrade. If you can't then just leave out the 'same' option to get the full convolution, which will of course be a longer array if you know about how convolutions work. But you can crop off the edges if you want manually after the convolution is done.

Manjuri on 20 Nov 2013

problem has occured can give the details about noise separation from signal

Image Analyst on 20 Nov 2013

I don't understand the above comment or question by Manjuri.

Image Analyst
Answer by Jan Simon on 18 Sep 2013

It is impossible to suggest a filter based on the information of the sample frequency only. We cannot know the nature of the noise and of the wanted signal. You could be interested in low or high frequencies or in a specific band. But the filter parameters must depend on these details. So please provide more information.


Gova ReDDy on 18 Sep 2013

So, as shown in the link the signal is containing noise which is labeled with red colour.Any suggestion to remove this kind of noise. Thanks in Advance.

Jan Simon on 19 Sep 2013

It matters if you have some peaks only, or if a frequency spectrum of the noise is know, if you know the frequency spectrum of the wanted signal and can suppress anything outside it.

Jan Simon

Contact us