# Remove any existing coefficients
GQD.remove()
# Define drift Coefficients. Note that the limiting mean is sinusoidal.
G0 <- function(t){2*(10+sin(2*pi*(t-0.5)))}
G1 <- function(t){-2}
# Define sinusoidal diffusion coefficient with `faster' oscillation.
Q1 <- function(t){0.25*(1+0.75*(sin(4*pi*t)))}
states <- seq(5,15,1/10) # State values
initial <- 8 # Starting value of the process
Tmax <- 5 # Time horizon
Tstart <- 1 # Time starts at 1
increment <- 1/100 # Incremental time steps
# Generate the transitional density
M <- GQD.density(Xs=initial,Xt=states,s=Tstart,t=Tmax,delt=increment)
GQD.plot(M)
Run the code above in your browser using DataLab