MATLAB Answers

How can I substitute all zeros of a matrix with minimum value of the same matrix?

1 view (last 30 days)
How can I substitute all zeros of a matrix with minimum value of the same matrix?

  0 Comments

Sign in to comment.

Accepted Answer

Purushottama Rao
Purushottama Rao on 3 Sep 2015
 a(a==0)=min(a(a~=0))

  3 Comments

Star Strider
Star Strider on 3 Sep 2015
@Purushottama Rao — Don’t worry about the ‘spam’ flag. It happens to us all. You correctly flagged it so someone would have discovered it when they checked the ‘Flagged Content’. I cleared them and cleared your flags as well.

Sign in to comment.

More Answers (0)

Sign in to answer this question.