フィルターのクリア

How to do sum of diagonal element of a matrix?

2 ビュー (過去 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 Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by