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 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeOperating on Diagonal Matrices についてさらに検索

質問済み:

2016 年 11 月 19 日

回答済み:

2016 年 11 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by