How to calculate kurtosis from a time domain EEG signal?

4 views (last 30 days)
Hi all, currently I am undergoing my undergrads study and I am focusing on EEG signal processing which is to develop a system to detect eye blinks from EEG signal and I proposed on using the Kurtosis as a feature for the signal classifier. I plan on using moving windows to process the signal of each EEG channel, and within that window I want to get the Kurtosis coefficients. The idea is that if the Kurtosis coefficient exceeds a pre-determined value, it will be marked as an eye blink. Note that this is to be done in time domain. My problem is how can I achieve that,as I am not familiar with the _kurtosis_ function in the Matlab. I really hope someone can help me with this. Thank you.

Answers (1)

Image Analyst
Image Analyst on 14 Mar 2016
The easiest way may be to use nlfilter() in the Image Processing Toolbox to do a moving filter with your custom function. Of course your custom function would be kurtosis() in the Statistics and Machine Learning Toolbox.
I attach a demo for nlfilter that you can adapt.
  4 Comments
Muhammad Syamil Shahrel
Muhammad Syamil Shahrel on 15 Mar 2016
Edited: Muhammad Syamil Shahrel on 15 Mar 2016
The below is the coding that I am working on currently, hope this helps U to help me solving this problem.
clc
clear
x=importdata('syamilr2.txt');
x1 = x(:,1);
fs = 256;
frame_duration = 0.1;
frame_len = frame_duration*fs;
N = length(x1);
num_frames = floor(N/frame_len);
for k =1 : num_frames
frame = x1( (k-1)*frame_len + 1: frame_len*k);
kurtosis = kurtosis(frame); %How can I make this work?#1
Mean_data = mean(frame); %How can I make this work?#2
end
Image Analyst
Image Analyst on 15 Mar 2016
You forgot to attach 'syamilr2.txt'.
Also, you destroyed the kurtosis function when you assigned it's output to a variable with the same name.
And you might want to index your mean and kurtosis so that you have an array where you know it for every window location along your signal.

Sign in to comment.

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!