Home how to create a transition probability matrix inside the transition probability matrix?
Reply: 1

how to create a transition probability matrix inside the transition probability matrix?

Harini Pushparaj
Harini Pushparaj Published in 2018-01-11 11:15:05Z

I am a beginner in Matlab.I have to create a 3D matrix using markov chain based approach. In order to understand my question, I request you to see the picture first. This approach has a table of the big 3D matrix with velocity and acceleration (i.e different state of velocity and acceleration).Each cell in the table has 2*2probability matrix. In each cell of transition probability matrix, the probability matrix of the velocity and the acceleration at the next time tk+1 are included.This probability matrix should have different acceleration state say like -0.5,0,0.5m/s^2 and velocity of 5,10,15 m/s, the values should be made parametric so that I can later decide to change it later.Then I should populate the matrix with a probability value, but before that, I want to know how to build this matrix.My question is how to build this 4 by 4 matrix .Can someone please suggest me how should I build this velocity and acceleration table which includes in-build 2 *2 matrix table in each cell.

Alex bGoode
Alex bGoode Reply to 2018-01-12 09:43:53Z

There are multiple ways to do this, but I would suggest using a cell array to store your transition matrix and than a normal matrix inside the transition matrix to store your probability matrices.

Create your transition matrix like so

transition = cell(4,4);

Add a probability matrix

transition{1,1} = [0.25, 0.25; 0.25, 0.25];

To easily access to correct entries given your parameters you can create an index map.

index_map_a = -0.5:0.5:0.5;
index_map_v = 0:1:92;
transition(index_map_v == 40, index_map_a == 0.5)
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313832 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO