How to raise a matrix to multiple powers 0 to 100.

조회 수: 6 (최근 30일)
David Wiles-Austin
David Wiles-Austin 2019년 12월 4일
댓글: David Wiles-Austin 2019년 12월 9일
Hello, how might one set up where a matrix can be raised through multiple powers one by one? I am trying to do the number [0:100] and then raising the matrix to those powers like this matrix(3x3)^[0:100], but no matter what it will not accept my parameters. I can not find an answer anywhere.

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 12월 4일
편집: KALYAN ACHARJYA 2019년 12월 4일
mat=..?? % Define the given Matrix
mat_result=cell(1,100);
for i=1:100
mat_result{i}=mat.^i;
end
  댓글 수: 3
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 12월 4일
편집: KALYAN ACHARJYA 2019년 12월 4일
Thanks @Stephan Cobeldick if not element wise, then
mat=..?? % Define the given Matrix
mat_result=cell(1,100);
for i=1:100
mat_result{i}=mat^i;
end
David Wiles-Austin
David Wiles-Austin 2019년 12월 9일
And would there be a way to multiply this by a 3x1 Matrix to show a population? As I am trying to graph this out.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Networks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by