changeset 800:1e708656e295

isbw: use boolean logic for increased performance.
author Carnë Draug <carandraug@octave.org>
date Tue, 08 Oct 2013 20:48:55 +0100
parents 08e2890c96cd
children 4598c2a5bf1a
files inst/isbw.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/inst/isbw.m
+++ b/inst/isbw.m
@@ -62,7 +62,7 @@
 endfunction
 
 function bool = is_bw_nonlogical (BW)
-  bool = all ((BW(:) == 1) + (BW(:) == 0));
+  bool = all ((BW(:) == 1) | (BW(:) == 0));
 endfunction
 
 %!shared a