How to simplify the for loops and if statement in this code

조회 수: 1 (최근 30일)
STEFAN-PAMFILOIU IULIANA
STEFAN-PAMFILOIU IULIANA 2020년 6월 19일
댓글: dpb 2020년 6월 23일
How to simplify for loops and if statements.
  댓글 수: 1
dpb
dpb 2020년 6월 23일
Please restore the original post -- there's no context for others going forward now.

댓글을 달려면 로그인하십시오.

채택된 답변

dpb
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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by