matlab - Summing Frequency Spectrums -


i've set of data eeg device want find strength of different brain waves in matlab. tried use eeglab wasn't sure how, @ point i'm using dsp toolbox in matlab.

for background: i've 15 epochs, 4 seconds in length. device sampled @ 256 hz, , there 264 sensors, there 1024 data points each sensor each epoch, i.e. raw data 264 x 1024 x 15. baseline removed. data in each epoch going used train classifier eventually, i'm dealing each epoch individually. i'll come more data samples later.

anyways, i've done far apply hann filter data , run fft on filtered data. have information in frequency domain. however, i'm not quite sure how go power of fft buckets power of frequency bands (e.g. alpha 8-13), values seek.

i know answer should straightforward can't seem find answer want online, , there's further confusion sources recommending using wavelet transform? here's little bit of code have far, input "data" 1 epoch, i.e. 264 x 1024.

% apply hann window siz = size(data); hann_window = hann(siz(2)); hann_window = repmat(hann_window.', siz(1), 1); hann_data = data.' * hann_window;   % run fft x = fft(hann_data, [], 2); x_mag = abs(x); x_mag = x_mag.'; 

thanks assistance!

if i'm understanding question correctly, wanting scale fft output correct power. need divide number of samples used fft.

x_mag = abs(x)/length(hann_data); % gives correct power. 

see question more info.

once content scaled correctly, can find power in band (e.g. 8 - 13 hz) integrating content start stop of band. since dealing discrete values discrete integration. perspective, equivalent changing resolution bandwidth of spectrum analyzer.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -