diff scripts/general/logical.m @ 3225:7aae2c3636a7

[project @ 1998-12-04 23:20:12 by jwe]
author jwe
date Fri, 04 Dec 1998 23:20:26 +0000
parents 8b262e771614
children 858695b3ed62
line wrap: on
line diff
--- a/scripts/general/logical.m
+++ b/scripts/general/logical.m
@@ -32,7 +32,11 @@
 function y = logical (x)
 
   if (nargin == 1)
-    y = x != 0;
+    if (! islogical (x))
+      y = x != 0;
+    else
+      y = x;
+    endif
   else
     usage ("logical (x)");
   endif