MATLAB Answers

How can I write code that multiplies one transition matrices by the different products of two matrixes?

1 view (last 30 days)
ag.. on 5 Apr 2019
Answered: A. Sawas on 6 Apr 2019
I am working on a problem where I need to multiply two matrices:
I would like to multiply the product of this matrix by the group1_transition again, and then repeat this 4 more times. Each time I want to multiply the product of the multiplication by group1_transition again. In other words how can I simplify the following into simple code:
n = group1_transition*group1_distribution
x = n*group1_transition
b = x*group1_transition
k = b*group1_transition
g = k*group1_transition

Answers (1)

A. Sawas
A. Sawas on 6 Apr 2019
You can use the power ^ operator:
g = group1_transition*group1_distribution*(group1_transition^4);


Sign in to comment.