Clear Filters
Clear Filters

Non-zero minimum of a line in a matrix

1 view (last 30 days)
Imane hammou ouali
Imane hammou ouali on 12 Mar 2019
Commented: Matt J on 12 Mar 2019
hello community,
i want to return the non-zero minimum of a line in a matrix how can i do it please?

Answers (1)

Matt J
Matt J on 12 Mar 2019
Edited: Matt J on 12 Mar 2019
A(A==0)=inf;
minvals=min(A,[],2),
  4 Comments
Matt J
Matt J on 12 Mar 2019
You're welcome, but please Accept-click the answer, to certify that it addressed your question.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!