what does A(~A) mean?
조회 수: 17 (최근 30일)
이전 댓글 표시
Hi
could someone tell me what does following code mean please?
A(~A)=inf; %A is a vector with zero and non-zero numbers.
Best,
댓글 수: 0
채택된 답변
Walter Roberson
2016년 11월 9일
It works out the same as
A(A~=0) =inf
Which is to say that it replaces all nonzero entries with infinity.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!