help to multiply matrices in succession
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I initialized this objects:
C = vpa(zeros(4, 4, N));
A = vpa(zeros(4,4,N));
where C is:
for i = 1:N
C(:,:,i) = [(cos(theta(i))) (-sin(theta(i))).*(cos(alpha(i))) (sin(theta(i))).*(sin(alpha(i))) (a(i)).*(cos(theta(i)));
(sin(theta(i))) (cos(theta(i))).*(cos(alpha(i))) (-cos(theta(i))).*(sin(alpha(i))) (a(i)).*(sin(theta(i)));
0 sin(alpha(i)) cos(alpha(i)) d(i);
0 0 0 1];
end
Well, I need that
A(:,:,1)=C(:,:,1);
but elements:
A(:,:,2) ....... A(:,:,N) must be obtained as
A(:,:,2) = C(:,:,1) * C(:,:,2)
A(:,:,3) = C(:,:,1) * C(:,:,2) * C(:,:,3)
etc
....
A(:,:,N) = C(:,:,1) * C(:,:,2) * C(:,:,3) * ....* C(:,:,N)
some tips ?
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!