diff scripts/special-matrix/hadamard.m @ 5901:5610a3fdeca6

[project @ 2006-07-22 08:40:40 by jwe]
author jwe
date Sat, 22 Jul 2006 08:40:40 +0000
parents 1fe78adb91bc
children 7fad1fad19e1
line wrap: on
line diff
--- a/scripts/special-matrix/hadamard.m	Sat Jul 22 08:31:17 2006 +0000
+++ b/scripts/special-matrix/hadamard.m	Sat Jul 22 08:40:40 2006 +0000
@@ -161,7 +161,10 @@
        '--++-++++-+-+----+++-----+--';
        '+--++-+-++-+-+----+++-----+-';
        '++--++-+-++-+-+----++------+'];
-  h = (s=='+');
+  ## Without this, the assignment of -1 will not work properly
+  ## (compatibility forces LHS(idx) = ANY_VAL to keep the LHS logical
+  ## instead of widening to a type that can represent ANY_VAL).
+  h = double (s=='+');
   h(!h) = -1;
 endfunction