Matlab hmm viterbi algorithm calculated state sequence Probability I have used matlab hmmviterbi function in my code for calculating the most probable state sequence from observation sequence.
Is there any way to derive the probability (score) of this calculated state sequence from the hmmviterbi code available in matlab or any other algorithm?
(Because i've used two hmms for each obsv sequence and i want to see which hmm is the winner or best matches.)
I am looking for smth like this:
hmmviterbi([2 3 1 5],trans,emis);

and the result would be:
state_seq = [2 2 3 4]
matching_score = 0.8

 A: I think you might be confusing 2 separate things here, but have a look at the following images before I try to explain my thinking and focus on the Scoring rows:



Is there any way to derive the probability (score) of this calculated state sequence from the hmmviterbi code available in matlab or any other algorithm? 

This looks like you are asking for a solution to problem 1 here, i.e. given a model $M$, a single path $π$ and a set of observations $x$, what is the actual joint probability of the path and the observations, if we know the model? You are trying to solve this:
$P(x,π|M)=a_{0π_1}*\Pi_ie_{πi}x_i\times a_{π_iπ_{i+1}}$
where you simply have to multiply the emission and the transition probabilities. See this image:

This will give you a score, for sure, but I am not convinced if this is the best solution for the second part of your question. Why? Well according to this:

You want to see which out of 2 models scores higher:

Because i've used two hmms for each obsv sequence and i want to see which hmm is the winner or best matches.

The probability over the best Viterbi path is a "cheap" alternative to the real solution. According to the last image, it is better to use either the Forward or the Backward algorithm. You can do this in matlab by using the hmmdecode command (I guess, I have never done this before, but according to the documentation, it returns the forward probabilities).
See also this question on where to find a Matlab forward algorithm implementation. A quick google search has also returned back this library as one of the first results.
*Source of all references and images in this answer: MIT Computational Biology: Genomes, Networks, Evolution, Lecture 07 Hidden Markov Models Part II
