Hidden Markov Model Forward algorithm: hmmf(P,O,Pi,Y)
Hidden Markov Model Backward algorithm: hmmb(P,O,Pi,Y)
Hidden Markov Model Backward/Forward algorithm: hmmfb(P,O,Pi,Y)
Important: Y is the observation (e.g. [3,1,3], that means elements of {1, 2, ..., n}, where n is the number of columns of the O matrix.
In other words, Y can not start with 0 (array indexing starts at 1).
You need to upload all the functions to your calculator (some of them depend on each other).