temporal = function(tu,tv,beta){ dt = tv - tu if (sum(dt<0)==0) { return (beta*exp(-beta*dt)) } else { return (NA) } }