dan
unread,May 19, 2012, 11:55:12 AM5/19/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have an EEG signal with 16 channels (basically a 16*5376 matrix, with 5376 being the number of samples for each channel of the signal) corresponding to 16 electrodes.
I need to calculate the sum of the PSD on 4 different bands (0.5-4Hz ; 4-8Hz ; 8-12Hz ; 12-20Hz) for each channel of the signal.
The code i used it
for j=1:16
psd=(abs(fft(signal.samples(j,:))).^2);
thetaband = sum(psd(12:85));
alphaband= sum(psd(86:169));
betaband= sum(psd(170:295));
gammaband = sum(psd(296:421));
12, 85 are the indexed of the frequencies 0.5 and 4 in the frequency vector i created using
n=5376;
fs=256;
dt=1/fs;
t=(0:n-1)*dt;
df=1/(n*dt);
f=(0:n-1)*df;
Am i doing anything wrong here? I'm not used to working with neither matlab nor eeg signals, so i'm at a loss here...