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.

채택된 답변

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 CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by