diff liboctave/CMatrix.cc @ 2964:0a2551ec7004

[project @ 1997-05-12 07:26:50 by jwe]
author jwe
date Mon, 12 May 1997 07:26:51 +0000
parents 3241d0057e78
children 91589ab98e37
line wrap: on
line diff
--- a/liboctave/CMatrix.cc
+++ b/liboctave/CMatrix.cc
@@ -1908,10 +1908,19 @@
 
 // unary operations
 
-Matrix
+boolMatrix
 ComplexMatrix::operator ! (void) const
 {
-  return Matrix (not (data (), length ()), rows (), cols ());
+  int nr = rows ();
+  int nc = cols ();
+
+  boolMatrix b (nr, nc);
+
+  for (int j = 0; j < nc; j++)
+    for (int i = 0; i < nr; i++)
+      b.elem (i, j) = elem (i, j) != 0.0;
+
+  return b;
 }
 
 // other operations