A strange error 'Undefined function or variable 'X'.'

2 views
Skip to first unread message

Wei, Jingjin

unread,
May 9, 2019, 9:35:33 AM5/9/19
to DynaSim Users
Hi all,

I come to find this really strange bug and couldn't figure out what is wrong here. The code could be simplified to a few lines yet still not run:

eqns={'dv/dt=0+@current'};

 

s=[];

s.populations(1).name='E';

s.populations(1).size=1; 

s.populations(1).mechanism_list={'iNa','iK'};

 

data=dsSimulate(s,'tspan',[0 100]);


The error is 
Undefined function or variable 'X'.

Error in solve_ode_20190509092123_219 (line 34)
  E_iNa_m_k1= (( (2.5-.1*(X+65))./(exp(2.5-.1*(X+65))-1))).*(1-E_iNa_m(n-1))-(( 4*exp(-(X+65)/18))).*E_iNa_m(n-1);

I take a look at the solver file, the difference between this and a correct one is that it doesn't register E_v as a state variable, and thus later on uses X instead of E_v. Since X is defined nowhere in a solver file, it couldn't run. Not sure why it is not though. I attached the solver file.

I might have missed something here, let me know what you spot.

Best,
Jingjin 

solve_ode_20190509092033_306.m

Wei, Jingjin

unread,
May 9, 2019, 9:43:54 AM5/9/19
to DynaSim Users
Nevermind please ignore my last email, turned out that I deleted a line by mistake and did not spot that lol.

Jingjin

From: dynasi...@googlegroups.com <dynasi...@googlegroups.com> on behalf of Wei, Jingjin <jing...@bu.edu>
Sent: Thursday, May 9, 2019 9:35 AM
To: DynaSim Users
Subject: [DS] A strange error 'Undefined function or variable 'X'.'
 
--
You received this message because you are subscribed to the Google Groups "DynaSim Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynasim-user...@googlegroups.com.
To post to this group, send email to dynasi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynasim-users/BN7PR03MB3633CB6E6F4058E3BE182CD6A7330%40BN7PR03MB3633.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages