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

4 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

G A
G A am 1 Mär. 2012
out = min(A(A~=0))

Weitere Antworten (0)

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by