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

조회 수: 4 (최근 30일)
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

채택된 답변

G A
G A 2012년 3월 1일
out = min(A(A~=0))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by