synsim.m

来自「MATLAB应用工具箱, MATLAB应用工具箱,」· M 代码 · 共 44 行

M
44
字号
%synsim - simulates a synapse%%   [s,t] = synsim( par, T, spikes ) simulates a%   synapse that receives an input spike train%   'spikes' (an array of spike times in msec)%   for 'T' msec. The synaptic parameters are%   passed in the structure 'par' with entries%%      par.Isatmax = synaptic saturation%      par.Itau    = synaptic time constant (ms)%%   synsim returns the synaptic variable 's' at%   the time points 't'.%%   Note: This "wrapper" function is not autonomous but%   needs the compiled version of the C-program ccsynsim%   (c) 2004 CK Machens & CD Brody%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function [s,t] = synsim( par, T, spikes )G.dt =  0.1;          %in msecG.t   = 0:G.dt:T;G.Nt  = length(G.t);if (isempty(spikes))  s = zeros(1,G.Nt);  return;end%integrate-and-fire neuron parametersG.satmax      =    par.Isatmax;G.tau         =    par.Itau;%input and output variablesG.nspikes  = length(spikes);G.spikes  = spikes;G.s       = zeros(1,G.Nt);ccsynsim(G);s = G.s;t = G.t;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?