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