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

조회 수: 1 (최근 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에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by