Access Diagonal Matrix Element

14 vues (au cours des 30 derniers jours)
Ana Rizkasari
Ana Rizkasari le 19 Nov 2016
Réponse apportée : KSSV le 19 Nov 2016
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

Réponse acceptée

KSSV
KSSV le 19 Nov 2016
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.

Plus de réponses (0)

Catégories

En savoir plus sur Operating on Diagonal Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by