Issue: vary both population size doesn't work properly with dsSimulate

Skip to first unread message

Wei, Jingjin

Jun 15, 2019, 7:11:21 PM6/15/19
to DynaSim Users
Hi all,

When varying two population sizes and maintain its ratio, I did:
 vary = {'(E,I)','(size,size)',[160 80;40 20]};

This doesn't seem to work properly: it runs through, but instead of giving me population pairs of (160, 40) and (80, 20), it gives me (40 40) and (20 20).

Another example that you can try:
  vary={'(E,I)','(gNa,gNa)',[20 30;40 50]};
If you do   
modifications_set = dsVary2Modifications(vary);
You get two sets with:
'(E,I)' '(gNa,gNa)' [20;40]    and .    '(E,I)' '(gNa,gNa)' [30;50]
and that is what we want.

 BUT if you run the simulation and check, the first simulation will have both E_gNa and I_gNa as [40 40] or [50 50]. Example code:
  s.populations(1).equations='dv/dt=@current+10; {iNa,iK}; v(0)=-65';
  s.populations(2).equations='dv/dt=@current+10; {iNa,iK}; v(0)=-65';
  vary={'(E,I)','(gNa,gNa)',[20 30;40 50]};
%   modifications_set = dsVary2Modifications(vary); 
    data=dsSimulate(s,'vary',vary,'tspan',[0 100]);

In summary, when covary a param for two population, dsVary2Modifications works out fine, but running with dsSimulate the vary isn't working properly, and would: using only the second row; giving the same number for both population.

Can anybody check this out? Thanks.  Version of matlab is 


Reply all
Reply to author
0 new messages