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

조회 수: 7 (최근 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 CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by