Azzera filtri
Azzera filtri

If A and B are 2x2 matrices, how is the input (A*B)^2 interpreted by MATLAB as?

1 visualizzazione (ultimi 30 giorni)
Is (A*B)^2 interpreted as A*B*A*B or (A*B)*(A*B)?

Risposte (2)

Matt J
Matt J il 4 Giu 2022
It is interpreted as,
tmp=A*B;
C=tmp*tmp;

Benjamin Thompson
Benjamin Thompson il 4 Giu 2022
Since 2x2 matrix multiplication is supported by the associative property, both of those interpretations are the same. This is similar to scalar multiplication.

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by