replacing all numbers in a certain row
    조회 수: 18 (최근 30일)
  
       이전 댓글 표시
    
Hi Guys Is there a way to replace all values in a row if just one value in the row meet a condition. Given a random 5x5 matrix. my condition is, if one number in a row is equal to -3, then all values in that row must be changed to -3.
To start with I thought that i could make a for loop, and then check each row and see if it meet the condition
Thank you in advance!
-David
댓글 수: 0
채택된 답변
추가 답변 (1개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

