tgrid <- seq(0, 10, length=1001)
## make it irregularly spaced
tgrid <- sort(sample(tgrid, 800))
## a 2-dim moving-resting bridge starting from c(0, 0)
## and ending at c(10, -10)
dat <- rMRB(tgrid, start_pt = c(0, 0), end_pt = c(10, -10),
lamM = 1, lamR = 1, sigma = 1, "m")
par(mfrow = c(2, 1))
plot(dat[,1], dat[,2], xlab="t", ylab="X(t)", type='l')
plot(dat[,1], dat[,3], xlab="t", ylab="X(t)", type='l')
par(mfrow = c(1, 1))
Run the code above in your browser using DataLab