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 Exchange에서 Operating 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