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

2 次查看(过去 30 天)
How can I substitute all zeros of a matrix with minimum value of the same matrix?
  2 个评论
Stephen23
Stephen23 2020-6-14
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?

请先登录,再进行评论。

采纳的回答

Purushottama Rao
Purushottama Rao 2015-9-3
 a(a==0)=min(a(a~=0))
  3 个评论
Star Strider
Star Strider 2015-9-3
@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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by