delta = c(0.5, 0.5)
beta = matrix(c(-2, 1, -1,
-2, -1, 1), nrow = 2, byrow = TRUE)
Gamma = tpm_p(1:24, 24, beta)
tod = rep(1:24, 10)
n = length(tod)
allprobs = matrix(runif(2*n), nrow = n, ncol = 2)
states = viterbi_p(delta, Gamma, allprobs, tod)
Run the code above in your browser using DataLab