if i want to change each value 1 in a matrix to 0 how to do that?
조회 수: 1 (최근 30일)
이전 댓글 표시
a=[1 2 3;1 3 3;2 1 2]
is there a function that make a as below
b=[0 2 3;0 3 3;2 0 2]
댓글 수: 2
José-Luis
2013년 12월 4일
Is this homework?
This can be solved with a combination of loops (for) and conditional statements (if), or in a syntactically simpler way with logical indexing.
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
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!