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?

Réponses (1)

Walter Roberson
Walter Roberson le 10 Nov 2016

0 votes

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

1 commentaire

Al Thr
Al Thr le 11 Nov 2016
Modifié(e) : Al Thr le 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

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Question posée :

le 10 Nov 2016

Modifié(e) :

le 11 Nov 2016

Community Treasure Hunt

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

Start Hunting!

Translated by