Access Diagonal Matrix Element

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

 Respuesta aceptada

KSSV
KSSV el 19 de Nov. de 2016

0 votos

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.

Más respuestas (0)

Categorías

Preguntada:

el 19 de Nov. de 2016

Respondida:

el 19 de Nov. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by