Thanks for your response! In the case of VectorContinuousCallback, the event is applied when a condition hits zero. How can it be used in the case of time intervals?
times = [ton, toff];
function affect!(integrator)
if integrator.t == ton
integrator.u[1] = stim;
elseif integrator.t == toff
integrator.u[1] = 0.0;
end
end
cb = PresetTimeCallback(times, affect!);
But it does not change the value. I think I misunderstood your answer. Thanks!