function act = input_function(N,t,Targets,VisDelay); % N - size of input % t - time step % Targets - matrix of size (T,4) where T is num of targets % and each defined by four numbers, onset, offset, xloc, Ic % VisDelay - delay from retinal stim till it reachs FEF visual cells TauV = 60.; SigP = 4.0; SigT = 2.0; act = zeros(1,N); tt = t - VisDelay; for i = 1:size(Targets,1) for j = 1:N if ( (tt>Targets(i,1)) & (tt(N/2)) xv = abs(N-xv); end phasic = exp( -(tt-Targets(i,1))/TauV ); tonic = (1.-phasic); phasic = phasic * exp( -(xv^2)/(2.*SigP^2)); tonic = tonic * 0.2 * Targets(i,4); tonic = tonic * exp( -(xv^2)/(2.*SigT^2)); act(1,j) = act(1,j) + phasic + tonic; end end end