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

1 vue (au cours des 30 derniers jours)
How can I substitute all zeros of a matrix with minimum value of the same matrix?
  2 commentaires
Stephen23
Stephen23 le 14 Juin 2020
Original question by Hamed Absharii 3rd September 2015, retrieved from Google Cache:
"How can I substitute all zeros of a matrix with minimum value of the same matrix?"
How can I substitute all zeros of a matrix with minimum value of the same matrix?
Rena Berman
Rena Berman le 12 Oct 2020
(Answers Dev) Restored edit

Connectez-vous pour commenter.

Réponse acceptée

Purushottama Rao
Purushottama Rao le 3 Sep 2015
 a(a==0)=min(a(a~=0))
  3 commentaires
Star Strider
Star Strider le 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by