Code covered by the BSD License  

Highlights from
MOtion DEcision (MODE) model

image thumbnail
from MOtion DEcision (MODE) model by Massimiliano Versace
MOtion DEcision (MODE) model is a neural model of perceptual decision-making.

right_part_lipFD.html

right_part_lipFD.m


function [Y1_rhs,Y2_rhs]=right_part_lipFD(RT,Y1,Y2,cohL,numtrials,dt)
%
% right_part_lipFD :: Function to generate the right portion in Figures 5 and 9 of Grossberg and Pilly (2008) of average lateral intraparietal 
% responses during fixed duration task trials for various coherences
%
%% Reference
% Grossberg, S. and Pilly, P. K. (2008). Temporal dyanamics of decision-making during motion perception in the visual cortex. Vision Research, 48(12), 1345-1373.
%
%% 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
% June 25, 2009

%%
% The right part of the plot is time-aligned to saccade intiation, and
% comprises activity 500 ms backward from that point

num=1+(0.5+0.1)/dt; % We want to average LIP responses from -500 ms to 100 ms with respect to saccade initiation

% Intializations
Y1_rhs=zeros(num,cohL);
Y2_rhs=zeros(num,cohL);
Z1=zeros(num,numtrials,cohL); % dummy
Z2=zeros(num,numtrials,cohL); % dummy

for coh=1:cohL
    for trial=1:numtrials
        RTsacc=RT(trial,coh); % note this is in msec
        tn_sacc=1+RTsacc/(1000*dt); % converting into time-steps
        if RTsacc~=0
            Z1(:,trial,coh)=Y1(tn_sacc-0.5/dt:tn_sacc+0.1/dt,trial,coh);
            Z2(:,trial,coh)=Y2(tn_sacc-0.5/dt:tn_sacc+0.1/dt,trial,coh);
        end
    end
end

for coh=1:cohL
    Y1_rhs(:,coh)=squeeze(sum(Z1(:,:,coh),2)./(sum(sign(Z1(:,:,coh)),2)+eps));
    Y2_rhs(:,coh)=squeeze(sum(Z2(:,:,coh),2)./(sum(sign(Z2(:,:,coh)),2)+eps));
end

return

Contact us at files@mathworks.com