https://github.com/PerezOrtegaJ/Neural_Ensemble_Analysis
Raw File
Tip revision: 9d37fd031dfbdb4eb69faa449d0a6416267a7d4f authored by Jesús Pérez on 28 July 2020, 20:36:58 UTC
Update README.md
Tip revision: 9d37fd0
Get_Indices_Before_And_After_Stimulus.m
function indices = Get_Indices_Before_And_After_Stimulus(stimulus,before_samples,after_samples)
% Get the indices befor and after and stimulus 
%
%       indices = Get_Indices_Before_And_After_Stimulus(stimulus,before_samples,after_samples)
%
% Jesus Perez-Ortega May 2019

during = stimulus>0; 
before = Bin_Signal(during,before_samples,'before');
after = Bin_Signal(during,after_samples,'after');
indices = find(before | during' | after);
    
back to top