Salva Ardid
unread,Apr 2, 2020, 3:45:55 PM4/2/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dynasi...@googlegroups.com
In the AMPA mechanism, try replacing:
-I1_E1_iAMPA_s(1,:)*(p.I1_E1_iAMPA_gAMPA*I1_E1_iAMPA_netcon).*
by
-I1_E1_iAMPA_s(1,:).*(p.I1_E1_iAMPA_gAMPA*I1_E1_iAMPA_netcon).*
Note .*() instead of *() above
Assuming that dimensions are correct, I think it should work...
El dijous, 2 d’abril de 2020, a les 15:25:11 EDT, Dylan Layfield va escriure:
I have an E-I network for each im trying to set a matrix for the strength
of the connections by changing either the 'gGABAa' value or the 'gAMPA'
value to matrix instead of just a single value
But when I try to put in a matrix of values for the 'gAMPA'
strConEI = [0.1*ones(1,33) 0.2*ones(1,33) 0.1*ones(1,34)]
in the code:
%Setting Equstions for the Model
eqns={
'dv/dt=Iapp+@current+noise*randn(1,N_pop);'
'monitor MECHANISM.functions, monitor v.spikes'
};
%timer
tic;
%create DynaSim specificaiton structure
s=[];
%settings for E cells
s.populations(1).name='E1';
s.populations(1).size=nE;
s.populations(1).equations=eqns;
s.populations(1).mechanism_list={'iNa','iK'};
s.populations(1).parameters={'Iapp',IappVals,'gNa',120,'gK',36,'noise',40};
%settings for I cells
s.populations(2).name='I1';
s.populations(2).size=nI;
s.populations(2).equations=eqns;
s.populations(2).mechanism_list={'iNa','iK'};
s.populations(2).parameters={'Iapp',0,'gNa',120,'gK',36,'noise',40};
%settings for I to E connections
s.connections(1).direction='I1->E1';
s.connections(1).mechanism_list={'iGABAa'};
s.connections(1).parameters={'tauD',5.5,'gGABAa',0.1,'netcon',netConIE};
%settings for E to I connections
s.connections(2).direction='E1->I1';
s.connections(2).mechanism_list={'iAMPA'};
s.connections(2).parameters={'tauD',2,'gAMPA',strConEI,'netcon',netConEI};
data=dsSimulate(s,'tspan',[0 1000]);
%timer
toc
Produces an error:
Error: Inner matrix dimensions must agree.
in solve_ode_20200402151903_219 (line 59)
in dsSimulate/tryFn (line 1048)
in dsSimulate (line 797)
Error using *
Inner matrix dimensions must agree.
Error in solve_ode_20200402151903_219 (line 59)
I1_E1_iAMPA_IAMPA(1,:)=-I1_E1_iAMPA_s(1,:)*(p.I1_E1_iAMPA_gAMPA*I1_E1_iAMPA_netcon).*(I1_v(1,:)-p.I1_E1_iAMPA_EAMPA);
Error in dsSimulate/tryFn (line 1048)
[outputs{1:length(output_variables)}]=feval(fname);
Error in dsSimulate (line 797)
tryFn(nargout)
Is there a way of setting a matrix/array of values for those connection
parameters just like you can modify the netcon?