EEG signal feature extraction Matlab Help

14 views (last 30 days)
I have a working Matlab code for generation of Wavelet coefficients to extract alpha, beta, gamma, delta and theta frequencies from given EEG Dataset.
if true
% code
end
%%Extract 5 frequency bands:
S = importdata('MyDataFile.txt');
waveletFunction = 'db8'; %OR 'sym8' OR 'coif5' OR 'db4';
[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
if true
% code
end
  • Item one: Please Help me to know that how these coefficients will be used ahead for generation of these different waveforms. I am doing it by Convolution as for example "y= conv(S,A8)". Is that right technique?
  • Item two: also please help me to know that in this code we are not defining any frequency range but all these waves have specific ranges of frequencies like 4 to 8Hz etc. So how this code is separating them into different frequency sets?
  2 Comments
karandeep kaur
karandeep kaur on 5 Dec 2018
can you please name the dataset on which this extraction of alpha, beta, gamma, delta and theta frequencies are performed .

Sign in to comment.

Answers (1)

Mokshith Kumar
Mokshith Kumar on 6 Apr 2018
thank you so much man :)

Categories

Find more on EEG/MEG/ECoG in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!