-
Notifications
You must be signed in to change notification settings - Fork 7
/
getKurtosis.m
42 lines (38 loc) · 1.55 KB
/
getKurtosis.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function featureVec = getKurtosis(data)
% getKurtosis calculates kurtosis feature vector for data
%
% Syntax:
% featureVec = getKurtosis(data)
%
% Input:
% data 3-D matrix of size channels x windowSize x windows or
% a 2-D matrix of size channels x windowSize
%
% Output:
% featureVec 2-D matrix of size windows x featureSize
% (featureVec is of size channels)
%
% Example:
%
% simulate data with 64 channels, 1000 time points and 10 windows
% the output will be size 10 x 64 (64 kurtosis values for each window.
% data = randn(64, 1000, 10);
% featureVec = getKurtosis(data);
% Copyright (C) 2013 Vernon Lawhern, UTSA, [email protected]
% Kay Robbins, UTSA, [email protected]
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
featureVec = (squeeze(kurtosis(data, [], 2)))';
end % getARFeatures