Assuming that you have already constructed or defined your memoryless Markov chain, you can use the forward algorithm to calculate the probability of observing a sequence of states up to a specific time point. Here's how to implement it in MATLAB using an example 3-state MC:
main.m818 chars36 lines
The final result alpha_T
is a vector containing the probability of observing the sequence of states up to time T, given the memoryless Markov chain.
gistlibby LogSnag