How to simplify the for loops and if statement in this code
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
STEFAN-PAMFILOIU IULIANA
el 19 de Jun. de 2020
Comentada: dpb
el 23 de Jun. de 2020
How to simplify for loops and if statements.
1 comentario
dpb
el 23 de Jun. de 2020
Please restore the original post -- there's no context for others going forward now.
Respuesta aceptada
dpb
el 19 de Jun. de 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')];
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!