Nn = 100;
Vt = (vca-vk)*(1:Nn)/Nn+vk;

   rminf = 0.5*(1.+tanh((Vt-v1)/v2));
   
   Wn = 0.5*(1.+tanh((Vt-v3)/v4));
     
   Vn = -(gca*rminf.*(Vt-vca)+gl*(Vt-vl)-Iapp)./(gk*(Vt-vk));

wrange = [ vk 60 min(Vn) 1.1];
