Authored by Anthony Boyer

Fix index error (Matlab starts at 1).

... ... @@ -116,8 +116,8 @@ function ImaGIN_SpikesDetection(S)
chunk_nb = fix(size(timeseries,2)/chunk_length);
if chunk_nb>0
for kk=1:chunk_nb
idx_start = (kk-1)*chunk_length;
idx_end = (kk)*chunk_length;
idx_start = ((kk-1)*chunk_length)+1;
idx_end = ((kk)*chunk_length);
chunk_timeseries = timeseries(:,idx_start:idx_end);
chunk_zeroed = zeroed(:,idx_start:idx_end);
chunk_table{end+1} = spikes_from_monopolar(srate,labels,chunk_timeseries,chunk_zeroed,coordinates,path_out);
... ...