library(ggplot2)
ana1CMToral <- function(Dose,pars,t){
  C <- 1/pars['V']
  L <- pars['CL']/pars['V']
  Dose * C * pars['KA']/(pars['KA']-L) * (exp(-L*t) - exp(-pars['KA']*t))
}
pars   <- c(KA=0.1,CL=1,V=1)
times  <- seq(0,24,length.out=200)
out    <- amp.sim::mdose(Dose=10,tau=24,ndose=1,t=times,func=ana1CMToral,pars=pars)
ggplot(out,aes(time,y)) + geom_line()
