Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 2 (최근 30일)
I am working on a problem where I need to multiply two matrices:
group1_transition*group1_distribution
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

답변 (1개)

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

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by