Raising a matrix to the power from 0 to 50

2 次查看(过去 30 天)
I have a matrix A how can i get the result A^2,A^3,A^3... A^50 by one command?
  1 个评论
Rik
Rik 2020-2-25
Why would you need a single command? This thread has two possible solutions for you. What doesn't work with those?

请先登录,再进行评论。

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by