Raising a matrix to the power from 0 to 50

2 Ansichten (letzte 30 Tage)
Anthony Cheung
Anthony Cheung am 25 Feb. 2020
Beantwortet: madhan ravi am 25 Feb. 2020
I have a matrix A how can i get the result A^2,A^3,A^3... A^50 by one command?
  1 Kommentar
Rik
Rik am 25 Feb. 2020
Why would you need a single command? This thread has two possible solutions for you. What doesn't work with those?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

madhan ravi
madhan ravi am 25 Feb. 2020
Wanted = arrayfun(@(x)A^x,0:50,'un',0);
celldisp(Wanted)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by