minimum value of a matrix with the main diagonal elements equals to zero

6 visualizzazioni (ultimi 30 giorni)
Hello,
I have a 10x10 matrix where the main diagonal is zeros.
How the minimum value of the elements is calculated, excluding the zeros?
Thank you.
Best,
Pavlos

Risposta accettata

G A
G A il 1 Mar 2012
out = min(A(A~=0))

Più risposte (0)

Categorie

Scopri di più su Operating on Diagonal Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by