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

1 vue (au cours des 30 derniers jours)
STEFAN-PAMFILOIU IULIANA
STEFAN-PAMFILOIU IULIANA le 19 Juin 2020
Commenté : dpb le 23 Juin 2020
How to simplify for loops and if statements.
  1 commentaire
dpb
dpb le 23 Juin 2020
Please restore the original post -- there's no context for others going forward now.

Connectez-vous pour commenter.

Réponse acceptée

dpb
dpb le 19 Juin 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')];

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by