Needed FRequency analysis of an EEG signal

12 次查看(过去 30 天)
Hi everyone.i am poor about matlab. i need to decompose EEG signals to ALpha,beta,gama... by using FFT. İ do not have a EEG database neither i do not know to use to database. please show me a way. thanks

采纳的回答

Salaheldin
Salaheldin 2012-5-9
to be more clear
x=load('EEG_data.txt'); y=fft(x); PS=abs(y).^2; N=length(x); fs=1000; freq=(1:N/2)*fs/N; plot(freq,PS)

更多回答(4 个)

Kosai
Kosai 2012-3-13
Onur i didn't see any Question in your Post, but i got that you like to extract the Band Frequancy from EEG-Data-Raw. At first the recorded EEG-Data were usually saved in Dataset not in Database, so you dont need to have a database of EEG but you need to make search in google about "EEG-DATASET". Second, The best way to extract the Band-Frequancy fromm EEG-Raw is the wavelet analysis, so if you have the wavelet-toolbox in your matlab version you can use this following code to extract the Band-Frequancy, but a very important piont is what is the sampling frequancy of your EEG-Raw ?? it is very important to determine how many Level do you have to extract to achieve the Band-Frequancy, so i will assume that your Fs = 1000Hz, so you need (8 Level wavelet decompostion):
S = "your EEG-Data-Row";
waveletFunction = 'db8' OR 'sym8' ;
[C,L] = wavedec(S,8,waveletFunction);
%%Calculation The Coificients Vectors
cD1 = detcoef(C,L,1); %NOISY
cD2 = detcoef(C,L,2); %NOISY
cD3 = detcoef(C,L,3); %NOISY
cD4 = detcoef(C,L,4); %NOISY
cD5 = detcoef(C,L,5); %GAMA
cD6 = detcoef(C,L,6); %BETA
cD7 = detcoef(C,L,7); %ALPHA
cD8 = detcoef(C,L,8); %THETA
cA8 = appcoef(C,L,waveletFunction,8); %DELTA
%%%%Calculation the Details Vectors
D1 = wrcoef('d',C,L,waveletFunction,1); %NOISY
D2 = wrcoef('d',C,L,waveletFunction,2); %NOISY
D3 = wrcoef('d',C,L,waveletFunction,3); %NOISY
D4 = wrcoef('d',C,L,waveletFunction,4); %NOISY
D5 = wrcoef('d',C,L,waveletFunction,5); %GAMMA
D6 = wrcoef('d',C,L,waveletFunction,6); %BETA
D7 = wrcoef('d',C,L,waveletFunction,7); %ALPHA
D8 = wrcoef('d',C,L,waveletFunction,8); %THETA
A8 = wrcoef('a',C,L,waveletFunction,8); %DELTA
  4 个评论
Srey
Srey 2013-5-3
What will be the decomposition level if the sampling frequency is 128 hz?
mamta p
mamta p 2019-2-11
I dont have wavelet toolbox, can you please tell me how can i decompose EEG signals using FFT. can you please provide me the code.

请先登录,再进行评论。


onur
onur 2012-12-26
selahaddin really thnx. your answer is realy helpfull.
  1 个评论
Shan Ahmed
Shan Ahmed 2018-2-22
Hi I'm trying to detect epilepsy from eeg signals, can you pls help me with the code for any feature extraction?

请先登录,再进行评论。


Salaheldin
Salaheldin 2012-5-9
Hi Onur,
I hope this message isn't too late...Here is what you need to do x=load('EEG_data.txt'); % assuming your data is stored in a text file called 'EEG_data.txt' y=fft(x); % this line computes the Fast Fourier Transform of your EEG data PS=abs(y).^2; this line computes the power spectrum N=length(x); % this line determines number of data points in your data for plotting fs=1000; % I am assuming your sampling frequency is 1000 Hz freq=(1:N/2)*fs/N; % this line generates a frequency vector for plotting your data...only plotting half your spectrum is sufficient..rest doesn't have unique information. plot(freq,PS) % ENJOY!!!
  4 个评论
suganya sri
suganya sri 2017-10-22
i am plting(freq,PS); ,i got error vector must be same length,pls help me how to clear

请先登录,再进行评论。


upasana talukdar
upasana talukdar 2015-10-7
Hi,
My EEG Data has 250 Hz Sampling frequency, And I want to extract signals of all bands from given main signal using DWT. Please tell me that in how many levels should I decompose my Signal for Fs=250?
  3 个评论
Rasa
Rasa 2019-4-8
Did you find any method to find out the number of levels needed ? Do you have matlab code to find out the frequency sub-bands of the EEG signal ?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Biomedical Signal Processing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by