# [Moved]: How to remove noise from an eeg signal contaminated with noise?

Status
Not open for further replies.

#### Aparna24

##### Newbie level 4
i need to remove noise from th eeg signal using a notch filter.Can anyone please help me with the coding?

#### barry

Re: How to remove noise from an eeg signal contaminated with noise?

Coding? Do you mean you want a DIGITAL filter? Your question is pretty vague. Frequency? Bandwidth? Order? Sampling frequency? Programming language? Other requirements?

#### dick_freebird

Re: How to remove noise from an eeg signal contaminated with noise?

They were assigning this problem in sophomore circuits
classes when I was an undergrad (30+ years ago). Nice
to know universities are keeping up (by moving the
problem to DSP... yeh.

#### Aparna24

##### Newbie level 4
Re: How to remove noise from an eeg signal contaminated with noise?

yes sir,i agree with u..I questioned in a vague manner without mentioning any information.
Sir firstly i initiated with a raw eeg data which i had taken from .mat file..Then i added noise to it..Now i want to filter that noise either by a filter that produces the best kind of results..The code for the above mentioned steps is given below:

Code PHP - [expand]1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
fs = 512
T = 1/fs;
N =length(EEGsig); ls = size(EEGsig);
tx =[0:length(EEGsig)-1]/fs;
fx = fs*(0:N/2-1)/N;
ax=1;
x=  EEGsig;
fNoise = 50;
aNoise = 0.25;
noise= aNoise*x;
signalNoise= x + noise;
figure();
subplot(3,1,1);
plot(tx, x);
xlabel('Time [s]');
ylabel('Amplitude');
title('Original signal');
subplot(3,1,2);
plot(tx, noise);
xlabel('Time [s]');
ylabel('Amplitude');
title('Noise');
subplot(3,1,3);
plot(tx, signalNoise);
xlabel('Time [s]');
ylabel('Amplitude');
title('Original signal + Noise');

#### barry

Matlab has a lot of tools for filtering. Try searching "matlab filters".

#### Aparna24

##### Newbie level 4
sir basically i want to use notch filter for removing noise.Can u help me with the syntax or the code itself?

##### Super Moderator
Staff member
sir basically i want to use notch filter for removing noise.Can u help me with the syntax or the code itself?
I think you need to practice your Google-Fu, it's very weak at the moment...

Though I have no idea how a notch filter will help you remove noise...unless that noise is at a fixed frequency, but then I wouldn't call that noise.

#### Aparna24

##### Newbie level 4
Thanks for your suggestion and also for your reply..I have recently joined here,and so m not well qualified as you are..Though i'll try to improve n work upon my Google-Fu..

Status
Not open for further replies.