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