function r = dTimerC(t,x,d,z,p)
%x-continunous state vector
% x = [xTC yTC];
%z-discrete state vector
% z = [tresC onC];
%p-parameter vector
% p = [tauC];
r = zeros(2,1);
r(1) = d(1) - z(2);
r(2) = x(2) - x(1) + z(1);