wavelet decomposition and power spectrum of an EEG signal
6 views (last 30 days)
Show older comments
Hi everyone! I'm poor in Matlab and i need help for a research. I've to compute the power spectrum of brain rhythms (alpha, beta, gamma, theta, delta) of an EEG signal. The signal has the following characteristics:
- data.mat (<19x265984 double>)
- Sampling Frequency --> 128Hz.
I'm not sure how many level need to obtain the band-frequency with the wavelet decomposition, but i suppose that 5 is the right number. I've read many posts on this forum, so i tried to process the following code:
% Frequency of sampling and time's sampling
Fs=128;
t=0:1/Fs:1
% Select the channels from the signal
for k = 1:19,
v = genvarname('Ch', who);
eval([v ' =data(k,:)']);
end;
% Define the wavelet's name and the level for decomposition
waveletName='db5';
level=5;
% Multilevel 1-D wavelet decomposition for channel 0
[c0,l0]=wavedec(Ch,level,waveletName);
% 1-D detail coefficients for ch0
cD1 = detcoef(c0,l0,1); %NOISY
cD2 = detcoef(c0,l0,2); %GAMMA
cD3 = detcoef(c0,l0,3); %BETA
cD4 = detcoef(c0,l0,4); %ALPHA
cD5 = detcoef(c0,l0,5); %THETA
cA5 = appcoef(c0,l0,waveletName,5); %DELTA
% Reconstruct single branch from 1-D wavelet coefficients for ch0
D1 = wrcoef('d',c0,l0,waveletName,1); %NOISY
D2 = wrcoef('d',c0,l0,waveletName,2); %GAMMA
D3 = wrcoef('d',c0,l0,waveletName,3); %BETA
D4 = wrcoef('d',c0,l0,waveletName,4); %ALPHA
D5 = wrcoef('d',c0,l0,waveletName,5); %THETA
A5 = wrcoef('a',c0,l0,waveletName,5); %DELTA
If everything is correct, what should I do to apply the power spectrum to the obtained rhythms? Thanks!
1 Comment
Favour Dada
on 21 Sep 2021
that is enough to extract the ppower spectrums but you should plot the graphs for beta, theta, gamma, beta in the denooised level.
Answers (0)
See Also
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!