How do i create a system of matrices from a single matrix?

1 visualizzazione (ultimi 30 giorni)
I have a matrix A(n,n) where n is a random number btw. 5-10000. I am supposed to create a system of matrices H1, H2....Hk, for k=2,3...n with a rule that is Hk = H1 * H(k-1), while H1 = A.
Basically i have to create so many matrices until i have n of them. I am sorry if anything is insufficient, i am totaly new to Matlab and have no idea what to do about it. Do you have any ideas?

Risposta accettata

Matt J
Matt J il 3 Dic 2021
Modificato: Matt J il 3 Dic 2021
H=cell(1,n);
H{1}=A;
for k=2:n
H{k}=A*H{k-1};
end

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by