1 2 3 4 5 6 7 8 9
temporal = function(tu,tv,beta){ dt = tv - tu if (sum(dt<0)==0) { return (beta*exp(-beta*dt)) } else { return (NA) } }