How to simplify the for loops and if statement in this code
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
STEFAN-PAMFILOIU IULIANA
am 19 Jun. 2020
Kommentiert: dpb
am 23 Jun. 2020
How to simplify for loops and if statements.
1 Kommentar
dpb
am 23 Jun. 2020
Please restore the original post -- there's no context for others going forward now.
Akzeptierte Antwort
dpb
am 19 Jun. 2020
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')];
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!