Avoid reading diagonal and redundant symmetric elements
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Mo H
el 26 de Mzo. de 2020
Comentada: Mo H
el 29 de Mzo. de 2020
Hello,
I would like to create a matlab function that reads matrix elements and print only those elements which are non diagonal and redundant.
For example,
A = [
1 2 3
2 5 6
3 6 7]
The function should only print; 2, 3, 6
Thank you a lot
0 comentarios
Respuesta aceptada
Peng Li
el 26 de Mzo. de 2020
use tril or triu function to get the lower or upper triangular matrix. Or use diag to get nonmain diagonal elements.
Más respuestas (0)
Ver también
Categorías
Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!