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?

Antworten (1)

Walter Roberson
Walter Roberson am 10 Nov. 2016

0 Stimmen

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

1 Kommentar

Al Thr
Al Thr am 11 Nov. 2016
Bearbeitet: Al Thr am 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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 10 Nov. 2016

Bearbeitet:

am 11 Nov. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by