Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LNDG
mMSE
Commits
3126e1e9
Commit
3126e1e9
authored
Sep 04, 2019
by
Julian Kosciessa
Browse files
apply old updates to PME function
parent
c77f6ae6
Changes
1
Hide whitespace changes
Inline
Side-by-side
ft_permentropyanalysis.m
View file @
3126e1e9
...
...
@@ -246,18 +246,25 @@ for s = 1:numel(timescales) % loop through timescales
break
% subsequent time points will also not work
end
% do point skipping for scales > 1, non-HP option
cg_data
=
{};
switch
coarsegrainmethod
case
'filtskip'
nloops
=
sc
;
if
strcmp
(
filtmethod
,
'hp'
)
nloops
=
1
;
% keep original sampling rate for hp option
stepSize
=
1
;
else
nloops
=
sc
;
stepSize
=
sc
;
end
cg_data
=
cell
(
nloops
,
1
);
% make cell: cg_data{istart}{trials}(chan-by-time)
for
is
=
1
:
nloops
% loop over starting points here!
resamp_x
=
data_sel
.
trial
;
cg_data
{
is
}
=
cellfun
(
@
(
resamp_x
)
resamp_x
(:,
is
:(
s
c
-
1
+
1
):
end
),
resamp_x
,
'UniformOutput'
,
false
);
% add padding% Filter
cg_data
{
is
}
=
cellfun
(
@
(
resamp_x
)
resamp_x
(:,
is
:(
s
tepSize
-
1
+
1
):
end
),
resamp_x
,
'UniformOutput'
,
false
);
% add padding% Filter
end
clear
resamp_x
;
case
'pointavg'
% original point averaging coarse graining, no loop over starting points
if
sc
==
1
% no coarse graining for native sampling rate
if
sc
==
1
||
strcmp
(
filtmethod
,
'hp'
)
% no coarse graining for native sampling rate
or high-pass entropy
cg_data
{
1
}
=
data_sel
.
trial
;
%only keep trial data
nloops
=
1
;
% no loop across starting points
else
% coarse-grain time series at this time scale
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment