What is the difference between a^3 and a.^3 if a is a matrix?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Eduardo Gallegos
am 29 Okt. 2022
Bearbeitet: James Tursa
am 29 Okt. 2022
C = magic(3)
D = C.^3;
D_max = max(D(:));
E = C^3
0 Kommentare
Akzeptierte Antwort
James Tursa
am 29 Okt. 2022
Bearbeitet: James Tursa
am 29 Okt. 2022
E = C^3 is a matrix power, equivalent to E = C*C*C, where these are all matrix multiplies.
D = C.^3 is element-wise power, where D(1,1) = C(1,1)*C(1,1)*C(1,1), etc.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Database Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!