I'm trying to make a simply function for
X(t) = (L^t)*X(0)
where t is a set [1,2,3,4,5,10,25,50,75]
L is a Leslie matrix [0 0 .42; .6 0 0; 0 .75 .95], and X(0) is my initial population is [42 0 95]'. can anyone tell how i can raise my matrix L to the set T for each value easily. like find L^t for each value of t in the set?

답변 (1개)

Walter Roberson
Walter Roberson 2016년 11월 10일

0 개 추천

arrayfun(@(T) L^T)*X0, t, 'Uniform', 0)

댓글 수: 1

Al Thr
Al Thr 2016년 11월 11일
편집: Al Thr 2016년 11월 11일
Xt = arrayfun(@(T) L^T)*X0, t, 'Uniform', 0) Xt = arrayfun(@(T) L^T)*X0, t, 'Uniform', 0) | Error: Unbalanced or unexpected parenthesis or bracket. Doesnt seem to work

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

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2016년 11월 10일

편집:

2016년 11월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by