123456789101112 |
- function [PSRout Nout]=MakePSR04(Nrast,Erast,Win)
- %Win is the time window around the event
- %N is the number of trials
- PSRout(1:size(Nrast,1),1)=NaN;
- for k=1:size(Erast,1) %loops through the trials ref event
- for i=1:length(Nrast) %loops through all lever presses
- tmp=Nrast(i)-Erast(k);
- if ~isempty(find(tmp>Win(1) & tmp<Win(2), 1))
- PSRout(i,1)=tmp(tmp>Win(1) & tmp<Win(2));
- end
- end
- end
|