Smart questions
Smart people
 Find A ForumFind An Expert
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Remember Me

Are you an
Engineering professional?
Join Eng-Tips now!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Just copy and paste the

#### Feedback

"...This site is awesome!...Things I have been trying to figure out for weeks, I got the answer in hours!..."

#### Geography

Where in the world do Eng-Tips members come from?

# Calculating frequency-transition matrix from state-transition matrix

 Forum Search FAQs Links Jobs Whitepapers MVPs
 saints123 (Computer) 27 Mar 12 14:14
 I am solving a Hidden Markov Model (HMM) problem for DNA sequences. Given: 1. DNA sequenceATGGGCTCCTCCGCCATCACCGTGAGCTTCCTCCTCTTTCTGGCATTTCAGCTCCCAGGGCAAACAGGAGCAAATCCCGTGTATGGCTCTGTGTCCAATGCAGACCTGATGGATTTCAAGTAAAAG 2. State-transition matrix (21x6)State   A   T   G   C   End  0     1   -1   -1   -1   -1  1    -1    2   -1   -1   -1  2    -1   -1    3   -1   -1  3     4    7    6    5   -1  4     8   11   10    9   -1  5     8   11   10    9   -1  6     8   11   10    9   -1  7    12   11   13    9   -1  8    14   17   16   15   -1  9    14   17   16   15   -1 10    14   17   16   15   -1 11    14   17   16   15   -1 12    18   17   19   15   -1 13    18   17   16   15   -1 14     4    7    6    5   20 15     4    7    6    5   20 16     4    7    6    5   20 17     4    7    6    5   20 18    -1   -1   -1   -1   20 19    -1   -1   -1   -1   20 20    -1   -1   -1   -1   -1Output:I need to calculate the 20X20 frequency-transition matrixExample:ATGGGCTCCTA->T is state 1->2 ==> count:1T->G is state 2->3 ==> count:1G->G is state 3->6 ==> count:1G->G is state 6->10==> count:1G->C is state 10->15==>count:1State 0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20 0 1          1 2               1 3                          1 4 5  6                                       1 7 8 9 10                                                         1 11 12 13 14 15 16 17 18 19 20I know how to proceed manually but I am unclear on how to solve this using Matlab.Please guide me on how to proceed. Any assistance shall be appreciated!Thanks!
 IRstuff (Aerospace) 27 Mar 12 16:14
 Homework postings are not allowed

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!