Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Bandpower calculation in MATLAB

Status
Not open for further replies.

lylea

Newbie level 1
Newbie level 1
Joined
Jan 23, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
Bandpower calculation

Hi,
I'm trying to calculate the bandpower of two frequency range,F on EEG signal as in the matlab programme below.This is not my programme,so I'm not fully understand how this program works.especially on "bp = [bp,log(filter(ones(W*fs,1),W*fs,filter(B,1,tmp).^2 ))];".
Is there anyone understand;
1)why log is used in this bandpower calculation?
2)Why there is two 'filter' is used in that line?
3)where exactly the bandpower calculation is done?why there is no 'trapz' to calculate the bandpower?

Thanx in advance.


s=load(data); %data name

fs=256;
W=1; %window size=1sec
F = [1,4;5,8]; %filter cutoff freq
bp = [];
tmp = s;
tmp(isnan(tmp))=0;
for k=1:size(F,1),
B = fir1(fs,F(k,:) / fs*2); %filter coefficient
bp = [bp,log(filter(ones(W*fs,1),W*fs,filter(B,1,tmp).^2 ))];
end;
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top