How to raise a matrix to multiple powers 0 to 100.
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
David Wiles-Austin
am 4 Dez. 2019
Kommentiert: David Wiles-Austin
am 9 Dez. 2019
Hello, how might one set up where a matrix can be raised through multiple powers one by one? I am trying to do the number [0:100] and then raising the matrix to those powers like this matrix(3x3)^[0:100], but no matter what it will not accept my parameters. I can not find an answer anywhere.
0 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 4 Dez. 2019
Bearbeitet: KALYAN ACHARJYA
am 4 Dez. 2019
mat=..?? % Define the given Matrix
mat_result=cell(1,100);
for i=1:100
mat_result{i}=mat.^i;
end
3 Kommentare
KALYAN ACHARJYA
am 4 Dez. 2019
Bearbeitet: KALYAN ACHARJYA
am 4 Dez. 2019
Thanks @Stephan Cobeldick if not element wise, then
mat=..?? % Define the given Matrix
mat_result=cell(1,100);
for i=1:100
mat_result{i}=mat^i;
end
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!