A(B)=0 What is its meaning?
조회 수: 9 (최근 30일)
이전 댓글 표시
A=rand(5)
B=A>0.8
A(B)=0
Can you tell me what is A(B)=0 meaning?
댓글 수: 0
채택된 답변
Fangjun Jiang
2019년 3월 6일
B is a logical index matrix. You can see the value is 1 (true) or 0 (false) wherever the corresponding value in A is greater than 0.8.
A(B)=0 means for all those places where B's value is true, set the corresponding value in A to 0.
Use this example to see it better.
A=magic(5)
B=A>10
A(B)=0
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!