0
votes

How to remove noise from ecg signal in ecg.wav format using filters in matlab ?

can anyone has a code how to read ecg.wav file and how to remove noise from this signal using filter to get pure and accurate ecg signal. now i am sending you a link youtube.com/watch?v=ddCwIirqJcI please visit that video and than it becomes more clear to you that i am talking about which type of notch filtering. I acquire that signal which he shows on oscilloscope but i have no idea how to perform filtering on that noisy signal to get pure ecg signal which he did in matlab shown in that video. This is the noisy signal which we acquire upload-mp3.com/files/338583_1f7te/Video0016.3gp

2

2 Answers

1
votes

You can use

[x,fs]=wavread('ecg.wav');

...to get that data into the workspace (assuming that it's a regular audio file), where x is the signal and fs is the sample rate.

You'll have to be a lot more specific about what the noise is before we can give detailed help with that. Standard ECG examples that I find online normally involve notch filtering out mains noise out.

You can generate a notch filter in Maltlab like so

[b,a]=butter(2,[35 75]/(fs/2), 'stop')

then look at the frequency response to see if it is the kind of thing you want like so

freqz(b,a,2^13,'half',fs)

enter image description here

then go ahead and filter your signal like this

x = filter(b,a,x);

I hope this helps you to make a start anyway

0
votes

You probably want an IIR (infinite impulse response) filter. Specifically, for a simple answer, a single-pole low-pass filter might do the job; for a more sophisticated answer, use something like a Butterworth filter.

You'll have to write the code after you decide just what kind of filter you want.