Access Diagonal Matrix Element

2 ビュー (過去 30 日間)
Ana Rizkasari
Ana Rizkasari 2016 年 11 月 19 日
回答済み: KSSV 2016 年 11 月 19 日
Hello,
I have matrix 15x60 dimension. How can I generate diagonal data?
If I use "diag" function, I only got matrix 15x1.
Thank you,
Ana

採用された回答

KSSV
KSSV 2016 年 11 月 19 日
As it is a rectangular matrix you will get 15 diagonal(i=j) elements. If you have a square matrix of size nxn, you will get n diagonal elements.

その他の回答 (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