User-provided partial derivatives of state-dependent delays

Implementation for tutorial demo neuron:

function dtau=sd_tau(k,xx,par)

returns delay $\tau_k$, depending on xx(:,1:k) ($[x(t),\ldots,x(t-\tau_{k-1})]$) and par.

function tau=sd_tau(k,xx,par)

if k==1
  tau=par(10);
elseif k==2
  tau=par(11);
elseif k==3
  tau=2+par(5)*par(10)*xx(2,1)*xx(2,2);
elseif k==4
 tau=1-1/(1+xx(2,3)*xx(1,1));
elseif k==5
 tau=xx(4,1);
elseif k==6
 tau=xx(5,1);
end;

return;