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.

left_part_lipFD.html

left_part_lipFD.m


function [Y1c_lhs,Y2c_lhs]=left_part_lipFD(RT,Y1,Y2,cohL,numtrials,dt)
%
% left_part_lipFD :: Function to generate the left 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 left part of the plot is time-aligned to the motion onset and is 1
% sec long

num=1+1/dt; % the first 1 sec from motion onset in the number of time-steps

% Initializations
Y1c_lhs=zeros(num,cohL);
Y2c_lhs=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);
        if RTsacc~=0
            Z1(:,trial,coh)=Y1(1:num,trial,coh);
            Z2(:,trial,coh)=Y2(1:num,trial,coh);
        end
    end
end

for coh=1:cohL
    Y1c_lhs(:,coh)=squeeze(sum(Z1(:,:,coh),2)./(sum(sign(Z1(:,:,coh)),2)+eps)); % 0.0001
    Y2c_lhs(:,coh)=squeeze(sum(Z2(:,:,coh),2)./(sum(sign(Z2(:,:,coh)),2)+eps));
end

return

Contact us at files@mathworks.com