필터 지우기
필터 지우기

How to do sum of diagonal element of a matrix?

조회 수: 1 (최근 30일)
Nadhirah Jofri
Nadhirah Jofri 2015년 8월 8일
답변: Walter Roberson 2015년 8월 8일
from what i know to do sum of diagonal element of a matrix is by:
tr(A)
but it says
Undefined function or method 'tr' for input arguments of type 'double'.
so i think i should do it manually by using the 'diag(A)'.. but...how i'm going to do 'sum of diag(A)' ?

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2015년 8월 8일

Walter Roberson
Walter Roberson 2015년 8월 8일

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by