-
Notifications
You must be signed in to change notification settings - Fork 31
Full Model Specification Using Equation Strings
Erik A. Roberts edited this page May 22, 2018
·
1 revision
Here is an example of a full model specification using equation strings.
eqns={
'E(size=5): dv/dt=@M; {m1}'; % alternatively: E.size(5)
'I: dv/dt=@M; {m1,iNa,iK}@M';
'E->I: @M+=mean(v_pre)'; % autoname EImX where X is the # of auto-named mechanism for the E->I connection
'E->I: {m2}; {iAMPA}@M';
'm1.mech: @M+=-v+1./v.^2';
'm2.mech: f(v)=g.*s.*(v-E); ds/dt=tanh(v_pre); @M+=f(v_post)';
}dsCheckSpecification converts the string into:
s.mechanisms(1).name='m1'
s.mechanisms(1).equations='@M+=-v+1./v.^2'
s.mechanisms(2).name='m2'
s.mechanisms(2).equations='f(v)=g.*s.*(v-E); ds/dt=tanh(v_pre); @M+=f(v_post)'
s.mechanisms(3).name='EIm1'
s.mechanisms(3).equations='@M+=mean(v)'
s.populations(1).name='E'
s.populations(1).size=5
s.populations(1).equations='dv/dt=@M; {m1}'
s.populations(2).name='I'
s.populations(2).equations='dv/dt=@M; {m1,iNa,iK}@M'
s.connections(1).direction='E->I'
s.connections(1).mechanism_list={'EIm1','m2','iAMPA@M'}