Directional transient cells



function [c_t2,e_t2]=DTransientCells(B_t1,c_t1,e_t1,A3,A4,C34,K34,Te)
%
% DTransientCells :: Function to simulate the directional transient cells
%
%% Inputs
%
% B_t1 :: Non-directional transient cell activities at time instant t1
%
% c_t1 :: Directional inhibitory interneuron activities at time instant t1
%
% e_t1 :: Directional transient cell activities at time instant t1
%
% A3 :: Response speed scaling parameter for directional inhibitory interneurons
%
% A4 :: Response speed scaling parameter for directional transient cells
%
% C34 :: Scaling parameter for excitation from non-directional transient cells
%
% K34 :: Scaling parameter for inhibition from opponent directional interneurons
%
% Te :: Output threshold of directional transient cells
%
%% Outputs
%
% c_t2 :: Directional inhibitory interneuron activities at time instant t2
%
% e_t2 :: Directional transient cell activities at time instant t2
%
%% Reference
% Grossberg, S., & Rudd, M.E. (1992). Cortical dynamics of visual motion perception: Short-range and long-range apparent motion. Psychological Review, 99, 78-121.
%
%% Author
% Praveen K. Pilly (advaitp@gmail.com)
%
%% License policy
% Written by Praveen K. Pilly, Department of Cognitive and Neural Systems, Boston University
% Copyright 2009, Trustees of Boston University
%
% Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted
% without fee, provided that the above copyright notice and this permission notice appear in all copies, derivative works and
% associated documentation, and that neither the name of Boston University nor that of the author(s) be used in advertising or
% publicity pertaining to the distribution or sale of the software without specific, prior written permission. Neither Boston
% University nor its agents make any representations about the suitability of this software for any purpose. It is provided "as
% is" without warranty of any kind, either express or implied. Neither Boston University nor the author indemnify any
% infringement of copyright, patent, trademark, or trade secret resulting from the use, modification, distribution or sale of
% this software.
%
%% Last modified
% Nov 17, 2009
 
% fixed time step of numerical integration (Forward Euler's method)
dt=0.001; % (in sec)
 
numdir=size(c_t1,3);
 
%% Directional inhibitory interneurons
for d=1:numdir
    D=modD(d+numdir/2,numdir); % opponent direction
    theta=(d-1)*2*pi/numdir;
    c_t2(:,:,d)=c_t1(:,:,d)+dt*A3*( -c_t1(:,:,d)+C34*B_t1-K34*max( shift(c_t1(:,:,D),theta),0 ) );
end
 
%% Directional transient cells
for d=1:numdir
    D=modD(d+numdir/2,numdir);
    theta=(d-1)*2*pi/numdir;
    e_t2(:,:,d)=e_t1(:,:,d)+dt*A4*( -e_t1(:,:,d)+C34*B_t1-K34*max( shift(c_t1(:,:,D),theta),0 ) );
end
E_t2=max(e_t2-Te,0); % thresholding and half-wave rectification
 
return