Closed fernandoandreotti closed 10 years ago
Confirmed. It looks like that the chunk of NSTDB is not big enough for the AR modelling. Check:
% == constants
AR_ORDER = 12; % number of poles
FS_NSTDB = 360; % sampling frequency of NSTDB
LG_NSTDB = FS_NSTDB*29; % number of points in NSTDB
NP_NSTDB = 20*FS_NSTDB; % number of points to select in NSTDB records to generate the AR coefficients
N_SAMP = floor(N/(fs/FS_NSTDB)); % N samples at fs correspond to N_SAMP at FS_NSTDB
NB_EL = size(epos,1); % number of electrodes
% == randomly select noise interval of size LG_SEL
start = round(LG_NSTDB*rand);
stop = start + NP_NSTDB;
´´´´
Problem was the number of randomly generated numbers for the AR modelling, added a max(N,N_SAMP), now should work.
Has a problem with sampling frequency under 360 Hz