Raising a matrix to a set

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?

Answers (1)

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

1 Comment

Al Thr
Al Thr on 11 Nov 2016
Edited: Al Thr on 11 Nov 2016
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

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 10 Nov 2016

Edited:

on 11 Nov 2016

Community Treasure Hunt

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

Start Hunting!