Closed neurofractal closed 4 years ago
Using the code from nt_detrend. The only outstanding question is this bit of the code.. which seems to grow the size of the window 5 times?
Window then slides by winsize/2.
So I currently I think the code is implemented such that, when winsize = 10s:
data_in_window = 60s stepsize = 5s
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% These values are grown by a factor of 5
% Is this needed??
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
counter=5;
while any (sum(min(w(start:stop),1))) <wsize
if counter <= 0 ; break; end
start=max(1,start-wsize/2);
stop=min(size(x,2),stop+wsize/2);
counter=counter-1;
end
Now implemented: see function HERE
Like #24, but for synthetic gradiometry.
Might require quite a bit re-write