Filter löschen
Filter löschen

Needed FRequency analysis of an EEG signal

22 Ansichten (letzte 30 Tage)
onur
onur am 13 Mär. 2012
Kommentiert: pavan kumar am 23 Nov. 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

Akzeptierte Antwort

Salaheldin
Salaheldin am 9 Mai 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)

Weitere Antworten (4)

Kosai
Kosai am 13 Mär. 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 Kommentare
Srey
Srey am 3 Mai 2013
What will be the decomposition level if the sampling frequency is 128 hz?
mamta p
mamta p am 11 Feb. 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.

Melden Sie sich an, um zu kommentieren.


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

Melden Sie sich an, um zu kommentieren.


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

Melden Sie sich an, um zu kommentieren.


upasana talukdar
upasana talukdar am 7 Okt. 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 Kommentare
Rasa
Rasa am 8 Apr. 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 am 23 Nov. 2020
use max level decomposition

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu EEG/MEG/ECoG finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by