How to simplify the for loops and if statement in this code
조회 수: 1 (최근 30일)
이전 댓글 표시
How to simplify for loops and if statements.
댓글 수: 1
dpb
2020년 6월 23일
Please restore the original post -- there's no context for others going forward now.
채택된 답변
dpb
2020년 6월 19일
Straightahead w/o trying to save some recomputations that could be done by complements--
k=[sum(A==B & A==0,'all') sum(A==B & A~=0,'all');sum(A~=B & A==0,'all') sum(A==B & A==1,'all')];
추가 답변 (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!