Filter löschen
Filter löschen

How to do sum of diagonal element of a matrix?

1 Ansicht (letzte 30 Tage)
Nadhirah Jofri
Nadhirah Jofri am 8 Aug. 2015
Beantwortet: Walter Roberson am 8 Aug. 2015
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)' ?

Antworten (2)

Azzi Abdelmalek
Azzi Abdelmalek am 8 Aug. 2015

Walter Roberson
Walter Roberson am 8 Aug. 2015

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by