-
Notifications
You must be signed in to change notification settings - Fork 1
/
skw2alpha.m
34 lines (32 loc) · 1.08 KB
/
skw2alpha.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% skw2alpha.m: Sets the thresholds for burst identification
% authors: Inkeri A. Välkki, Kerstin Lenk, Jarno E. Mikkonen, Fikret E. Kapucu, Jari A. K. Hyttinen
% date: 2016 - 2019
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [ BurstAlpha, TailAlpha ] = skw2alpha( Skw )
% skw2alpha( Skw ) returns the alphas for the skewnesses
% [ BurstAlpha, TailAlpha ] = skw2alpha( Skw )
% in:
% Skw: vector (or scalar) of skewness values
% out:
% BurstAlpha, TailAlpha: vectors of size of Skw
BurstAlpha = zeros(size(Skw));
TailAlpha = zeros(size(Skw));
for i = 1:length(Skw)
if isnan(Skw(i))
BurstAlpha(i) = nan;
TailAlpha(i) = nan;
elseif Skw(i) < 1
BurstAlpha(i) = 1;
TailAlpha(i) = 0.7;
elseif Skw < 3%4
BurstAlpha(i) = 0.7;
TailAlpha(i) = 0.5;
elseif Skw < 9
BurstAlpha(i) = 0.5;
TailAlpha(i) = 0.3;
else
BurstAlpha(i) = 0.3;
TailAlpha(i) = 0.1;
end
end