Creating a vector from the diagonal values of a square matrix

34 ビュー (過去 30 日間)
Kourosh
Kourosh 2014 年 7 月 30 日
回答済み: Ahmet Cecen 2014 年 7 月 30 日
Hello,
Does anybody know how I can read the diagonal values of a square matrix and create a vector (1:n) from those values?
Cheers,
Cyrus

採用された回答

Ahmet Cecen
Ahmet Cecen 2014 年 7 月 30 日
vector=diag(matrix);
check help diag for more detailed information.

その他の回答 (0 件)

カテゴリ

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