Create a row vector of the diagonal elements from matrix.

23 ビュー (過去 30 日間)
Benjamin Nienhouse
Benjamin Nienhouse 2020 年 10 月 17 日
コメント済み: Star Strider 2020 年 10 月 17 日
So I am knew to MATLAB and have a question reguarding matricies.
I'm wondeirng how to create a row vector from the diagonal values (Top left to bottom right) from a matrix (I'm using a 6x6 matrix).
Any advice would be much appreaciated.
Thanks,
Ben.
  1 件のコメント
per isakson
per isakson 2020 年 10 月 17 日
Search for "diagonal" in the documentation
>> doc diagonal

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2020 年 10 月 17 日
Meet the diag function!
  2 件のコメント
Benjamin Nienhouse
Benjamin Nienhouse 2020 年 10 月 17 日
it works, thanks guys so much
Star Strider
Star Strider 2020 年 10 月 17 日
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

サインインしてコメントする。

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