function [PSRout Nout]=MakePSR04(Nrast,Erast,Win,PRMS) %Win is the time window around the event %PRMS=2 give a PSR cell {neurons,trials} and PRMS=1 collapses all the trials > %cell{neurons,1} %N is the number of trials Otype=PRMS{1}; FLAG=0;Bmax=0; if length(PRMS)>1 FLAG=1; end if Otype==1 PSRout=cell(size(Nrast,1),1); for i=1:length(Nrast) for k=1:size(Erast,1) tmp=Nrast{i}-Erast(k); if ~isempty(find(tmp>Win(1) & tmpWin(1)-Bmax & tmpWin(1)-Bmax & tmpWin(1) & tmpWin(1)-Bmax & tmpWin(1)-Bmax & tmp