Create pbtrans.m

This Matlab program forms the transition probability matrix of battery level vectors B from independent transition probability matrices of each node.
Scenario:
Consider N nodes in a network with each node i having Bi+1 discrete battery levels. That is, node i can at any time be at exactly one of the following battery levels {bi_0, bi_1, ..., bi_Bi}. We are given the battery level transition probability matrix for each node, PBi of size (Bi+1) x (Bi+1). Each cell in this matrix indicates the probability of node i transitioning to a new battery level bi_k if it is currently in level bi_j. The transition probabilities of each node are independent of each other.
Let the vector B = {bi} for all i in N, that is, bi is the current battery level of node i. We wish to obtain the combined transition probability matrix, PB, which is the transition probability of each battery level vector B to all other battery level vectors B'. The transition probability for each vector is simply the product of each node's transition probability.
This problem was encountered during my dissertation work wherein we proposed to formulate the network routing problem as a semi-Markov decision process.