0 Replies - 784 Views - Last Post: 25 July 2019 - 11:25 PM Rate Topic: -----

#1 satyam2007   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 25-July 19

TRansition matrix in Markov Chain

Posted 25 July 2019 - 11:25 PM

I wanted to code for the transition matrix for a markov process for potassium channel during action potential. I made a state matrix, a transition matrix and an end matrix. But when I run the code it shows error saying that the operands for 'int' and 'function' are unsupported. I'm not sure how should I code for the transition matrix and obtain the next possible state for the potassium channels.

this is my code:

states = ['n0','n1','n2','n3','n4']

transition_name = [['n0n0','n0n1'],['n1n0','n1n1','n1n2'],['n2n1','n2n2','n2n3'],['n3n2','n3n3','n3n4'],['n4n3','n4n4']]

transition_matrix = [[-4*alpha_n,beta_n],
[4*alpha_n,(-3*alpha_n-beta_n),2*beta_n],
[3*alpha_n,(-2*alpha_n-2*beta_n),3*beta_n],
[2*alpha_n,(-alpha_n-3*beta_n),4*beta_n],
[alpha_n,-4*beta_n]].T

Is This A Good Question/Topic? 1
  • +

Page 1 of 1