What is the difference between a^3 and a.^3 if a is a matrix?

10 ビュー (過去 30 日間)
Eduardo Gallegos
Eduardo Gallegos 2022 年 10 月 29 日
編集済み: James Tursa 2022 年 10 月 29 日
C = magic(3)
D = C.^3;
D_max = max(D(:));
E = C^3

採用された回答

James Tursa
James Tursa 2022 年 10 月 29 日
編集済み: James Tursa 2022 年 10 月 29 日
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 件)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by