Borrar filtros
Borrar filtros

Needed FRequency analysis of an EEG signal

39 visualizaciones (últimos 30 días)
onur
onur el 13 de Mzo. de 2012
Comentada: pavan kumar el 23 de Nov. de 2020
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

Respuesta aceptada

Salaheldin
Salaheldin el 9 de Mayo de 2012
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)

Más respuestas (4)

Kosai
Kosai el 13 de Mzo. de 2012
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 comentarios
Srey
Srey el 3 de Mayo de 2013
What will be the decomposition level if the sampling frequency is 128 hz?
mamta p
mamta p el 11 de Feb. de 2019
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.

Iniciar sesión para comentar.


onur
onur el 26 de Dic. de 2012
selahaddin really thnx. your answer is realy helpfull.
  1 comentario
Shan Ahmed
Shan Ahmed el 22 de Feb. de 2018
Hi I'm trying to detect epilepsy from eeg signals, can you pls help me with the code for any feature extraction?

Iniciar sesión para comentar.


Salaheldin
Salaheldin el 9 de Mayo de 2012
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 comentarios
suganya sri
suganya sri el 22 de Oct. de 2017
i am plting(freq,PS); ,i got error vector must be same length,pls help me how to clear
pavan kumar
pavan kumar el 23 de Nov. de 2020
make PS to half to plot

Iniciar sesión para comentar.


upasana talukdar
upasana talukdar el 7 de Oct. de 2015
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 comentarios
Rasa
Rasa el 8 de Abr. de 2019
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 ?
pavan kumar
pavan kumar el 23 de Nov. de 2020
use max level decomposition

Iniciar sesión para comentar.

Categorías

Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by