필터 지우기
필터 지우기

Creating a vector from the diagonal values of a square matrix

조회 수: 40 (최근 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 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