% Created by Eugene M.Izhikevich, February 25, 2003
% Excitatory neurons Inhibitory neurons
Ne=200;Ni=800;
re=rand(Ne,1);ri=rand(Ni,1);
a=[0.02*ones(Ne,1);0.02+0.08*ri];
b=[0.2*ones(Ne,1);0.25-0.05*ri];
c=[-65+15*re.^2;-65*ones(Ni,1)];
d=[8-6*re.^2;2*ones(Ni,1)];
S=[0.5*rand(Ne+Ni,Ne),-rand(Ne+Ni,Ni)];
v=-65*ones(Ne+Ni,1);% Initial values of v
u=b.*v; % Initial values of u
firings=[];% spike timings
for t=1:1000% simulation of 1000 ms
if t<= 100
I=[5*randn(Ne,1);2*randn(Ni,1)]; % thalamic input
fired=find(v>=30);% indices of spikes
firings=[firings; t+0*fired,fired];
v(fired)=c(fired);
u(fired)=u(fired)+d(fired);
I=I+sum(S(:,fired),2);
v=v+0.5*(0.04*v.^2+5*v+140-u+I);% step 0.5 ms membrane potential
v=v+0.5*(0.04*v.^2+5*v+140-u+I);% for numerical
u=u+a.*(b.*v-u);% stability membrane recovery
else
fired=find(v>=30);% indices of spikes
firings=[firings; t+0*fired,fired];
v(fired)=c(fired);
u(fired)=u(fired)+d(fired);
v=v+0.5*(0.04*v.^2+5*v+140-u);% step 0.5 ms membrane potential
v=v+0.5*(0.04*v.^2+5*v+140-u);% for numerical
u=u+a.*(b.*v-u);% stability membrane recovery
end
end
niTime=firings(firings(:,2)>Ne);
numArray=firings(:,2);
niNum=numArray(find(numArray>Ne));
eTime=firings(firings(:,2)<=Ne);
eUniTime=unique(eTime);
eUniCount = hist(eTime,unique(eTime));
eNum=numArray(find(numArray<=Ne));
figure(1);
plot(niTime,niNum,'.r');
xlabel('time'), ylabel('neuron number');
hold on
plot(eTime,eNum,'.b');
xlabel('time'), ylabel('neuron number');
figure(2);
hold on
plot(eUniTime,eUniCount);
xlabel('time'), ylabel('number of excitatory neurons');
没有合适的资源?快使用搜索试试~ 我知道了~
基于matlab的spiking neurons network模拟.zip
共8个文件
m:5个
txt:1个
html:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 188 浏览量
2023-10-24
12:09:35
上传
评论
收藏 572KB ZIP 举报
温馨提示
基于matlab的spiking neurons network模拟.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于matlab的spiking neurons network模拟.zip (8个子文件)
workshop3_4b.gif 592KB
www.imdn.cn.txt 366B
workshop3_2.m 2KB
workshop3_3_in.m 1KB
workshop3_3_ex.m 1KB
workshop3_1.m 1KB
workshop3_4b.m 1KB
1
www.imdn.cn.html 66B
共 8 条
- 1
资源评论
GZM888888
- 粉丝: 186
- 资源: 2962
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功