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.

analyzeMTMST.html

analyzeMTMST.m


function analyzeMTMST(Motion,coherences)
%
% analyzeMTMST :: Function that computes statistics (across trials) of 
% average model middle temporal and medial superior temporal responses as 
% a function of motion coherence
%
%% Input variables
% Motion :: 5D matrix that stores the dynamics of population activity of
% middle temporal and medial superior temporal neurons
% [1: time steps, 2: preferred direction, 3: coherence level, 4: trial, 5:
% middle temporal or medial superior temporal]
%
% coherences :: Coherence levels between 0 and 100%
%
%% 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

%%
% fixed time step of numerical integration
dt=0.001; % (in sec)

cohL=size(Motion,3);
numtrials=size(Motion,4);

MTdynamics=Motion(:,:,:,:,1)/(60*60);
MSTdynamics=Motion(:,:,:,:,2)/(60*60);

% We compute MT and MST response statistics at 1 sec
dur=1+1000/(dt*1000);

meanMT(:,:)=mean(MTdynamics(dur,:,:,:),4);
meanMST(:,:)=mean(MSTdynamics(dur,:,:,:),4);

semMT(:,:)=std(MTdynamics(dur,:,:,:),1,4)/sqrt(numtrials);
semMST(:,:)=std(MSTdynamics(dur,:,:,:),1,4)/sqrt(numtrials);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Figure 11 in Grossberg and Pilly (2008)
figure
errorbar(coherences,meanMT(1,:),semMT(1,:),'bo-')
hold on
errorbar(coherences,meanMT(5,:),semMT(5,:),'bs--')
xlabel('Stimulus correlation (%)','Fontsize',15)
ylabel('Mean response','Fontsize',15)
title('Average model MT cell activity','Fontsize',15)
box off

figure
errorbar(coherences,meanMST(1,:),semMST(1,:),'ro-')
hold on
errorbar(coherences,meanMST(5,:),semMST(5,:),'rs--')
xlabel('Stimulus correlation (%)','Fontsize',15)
ylabel('Mean response','Fontsize',15)
title('Average model MST cell activity','Fontsize',15)
box off
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

return


% This code was written to do least squares estimated linear and quadratic
% fits

% % X=[0 3.2 6.4 12.8 25.6 51.2];
% %
% % [p1l]=polyfit(X,mt1,1); % linear fit
% % [p1q]=polyfit(X,mt1,2); % quadratic fit
% % [p5l]=polyfit(X,mt5,1);
% % [p5q]=polyfit(X,mt5,2);
% %
% % X1=0:0.1:60;
% % for j=1:size(X1,2)
% %     Y1l(j)=p1l(1)*X1(j)+p1l(2);
% %     Y1q(j)=p1q(1)*X1(j)^2+p1q(2)*X1(j)+p1q(3);
% %     Y5l(j)=p5l(1)*X1(j)+p5l(2);
% %     Y5q(j)=p5q(1)*X1(j)^2+p5q(2)*X1(j)+p5q(3);
% % end
% %
% % ql1=p1q(1)/p1q(2)
% % ql5=p5q(1)/p5q(2)
% %
% % figure
% % plot(X,mt1,'ko')
% % hold on
% % plot(X,mt5,'ko')
% % plot(X1,Y1l,'k')
% % plot(X1,Y5l,'k')
% % plot(X1,Y1q,'k--')
% % plot(X1,Y5q,'k--')
% % hold off
% % xlabel('Stimulus correlation (%)')
% % ylabel('Mean response')
% %
% %
% % [p1l]=polyfit(X,mst1,1);
% % [p1q]=polyfit(X,mst1,2);
% % [p5l]=polyfit(X,mst5,1);
% % [p5q]=polyfit(X,mst5,2);
% %
% % X1=0:0.1:60;
% % for j=1:size(X1,2)
% %     Y1l(j)=p1l(1)*X1(j)+p1l(2);
% %     Y1q(j)=p1q(1)*X1(j)^2+p1q(2)*X1(j)+p1q(3);
% %     Y5l(j)=p5l(1)*X1(j)+p5l(2);
% %     Y5q(j)=p5q(1)*X1(j)^2+p5q(2)*X1(j)+p5q(3);
% % end
% %
% % ql1=p1q(1)/p1q(2)
% % ql5=p5q(1)/p5q(2)
% %
% % figure
% % plot(X,mst1,'ko')
% % hold on
% % plot(X,mst5,'ko')
% % plot(X1,Y1l,'k')
% % plot(X1,Y5l,'k')
% % plot(X1,Y1q,'k--')
% % plot(X1,Y5q,'k--')
% % hold off
% % xlabel('Stimulus correlation (%)')
% % ylabel('Mean response')

Contact us at files@mathworks.com