Hi, I am trying to classify an EEG signal from Graz data set b, which consists of a 604803x3 array to define the data. Every row represents EEG signal along time, while every column represents a channel (three relevant channel in total). I've extracted the various features I need for classification, however, I am having trouble reorganizing the data.
One of the features I have extracted is the Bandpower Estimate for two frequency ranges, which gives me two 604803x3 matrices of the bandpower at each time point for all three channels. I have another column vector called HDR.TRIG that contains the relevant time points I needs (120 in total). What I want to do is calculate the mean of bandpower at each HDR.TRIG for a range defined by sampling rate*time, per channel, to produce a 120x3 matrix.
I've done the following to produce a 120x3 matrix, but I am absolutely positive that this is wrong since there is no separability for classification, when there should be.
StRate = HDR.SampleRate*0.5;
EnRate = HDR.SampleRate*2.5;
for i = 1:length(HDR.TRIG)
T = HDR.TRIG(i,1);
for ch = 1:3
BPE1(i,ch) = mean(BPEsensor((T+StRate):(T+EnRate),ch));
for ch = 4:6
BPE2(i,ch-3) = mean(BPEsensor((T+StRate):(T+EnRate),ch));
The parameters are as such:
- BPEsensor --> 604803x6 matrix containing BPE1 in columns 1:3 and BPE2 in columns 4:6
- BPE1 --> Contains bandpower from a certain frequency range
- BPE2 --> Contains bandpower from another range.
Essentially, I want BPE1 and BPE2 to be 120x3 matrices each containing data for each bandpower. I've been attempting this problem for a very long time and am on the verge of giving up. Any guidance to point me in the right direction would be very much appreciated.