Home > SaliencyToolbox > evolveLeakyIntFire.m

evolveLeakyIntFire

PURPOSE ^

evolveLeakyIntFire - evolves an LIF network by one time step.

SYNOPSIS ^

function [LIF,spikes] = evolveLeakyIntFire(LIF,t)

DESCRIPTION ^

 evolveLeakyIntFire - evolves an LIF network by one time step.

 [LIF,spikes] = evolveLeakyIntFire(LIF,t)
    Computes on integration step of length t for the network 
    of leaky integrate and fire neurons in LIF, return the 
    new LIF neurons, and return a vector of spiking activity 
    (0 or 1) in spikes.

 See also defaultLeakyIntFire, evolveWTA, dataStructures.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % evolveLeakyIntFire - evolves an LIF network by one time step.
0002 %
0003 % [LIF,spikes] = evolveLeakyIntFire(LIF,t)
0004 %    Computes on integration step of length t for the network
0005 %    of leaky integrate and fire neurons in LIF, return the
0006 %    new LIF neurons, and return a vector of spiking activity
0007 %    (0 or 1) in spikes.
0008 %
0009 % See also defaultLeakyIntFire, evolveWTA, dataStructures.
0010 
0011 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0012 % by Dirk B. Walther and the California Institute of Technology.
0013 % See the enclosed LICENSE.TXT document for the license agreement.
0014 % More information about this project is available at:
0015 % http://www.saliencytoolbox.net
0016 
0017 function [LIF,spikes] = evolveLeakyIntFire(LIF,t)
0018 
0019 dt = t - LIF.time;
0020 
0021 % integrate
0022 LIF.V = LIF.V + dt./LIF.C * (LIF.I - LIF.Gleak.*(LIF.V - LIF.Eleak) - ...
0023                              LIF.Gexc.*(LIF.V - LIF.Eexc) - ...
0024                              LIF.Ginh.*(LIF.V - LIF.Einh));
0025   
0026 % clamp potentials that are lower than Einh
0027 idx = (LIF.V < LIF.Einh);
0028 if (length(LIF.Einh) > 1)
0029   LIF.V(idx) = LIF.Einh(idx);
0030 else
0031   LIF.V(idx) = LIF.Einh;
0032 end
0033 
0034 % let Ginh decay (for IOR to wear off)
0035 LIF.Ginh = LIF.Ginh * LIF.GinhDecay;
0036   
0037 % fire?
0038 spikes = (LIF.V > LIF.Vthresh) & LIF.DoesFire;
0039 
0040 % reset units that have just fired
0041 LIF.V(spikes) = 0;
0042   
0043 LIF.time = t;

Generated on Thu 18-Jul-2013 06:10:46 by m2html © 2005