Raising a matrix to the power from 0 to 50

2 vues (au cours des 30 derniers jours)
Anthony Cheung
Anthony Cheung le 25 Fév 2020
I have a matrix A how can i get the result A^2,A^3,A^3... A^50 by one command?
  1 commentaire
Rik
Rik le 25 Fév 2020
Why would you need a single command? This thread has two possible solutions for you. What doesn't work with those?

Connectez-vous pour commenter.

Réponses (1)

madhan ravi
madhan ravi le 25 Fév 2020
Wanted = arrayfun(@(x)A^x,0:50,'un',0);
celldisp(Wanted)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by