diff liboctave/CMatrix.cc @ 1561:ffee86c37931

[project @ 1995-10-12 08:08:25 by jwe]
author jwe
date Thu, 12 Oct 1995 08:12:14 +0000 (1995-10-12)
parents d1fe5918e16b
children dd7d27461567
line wrap: on
line diff
--- a/liboctave/CMatrix.cc
+++ b/liboctave/CMatrix.cc
@@ -191,18 +191,7 @@
 ComplexMatrix&
 ComplexMatrix::insert (const ComplexMatrix& a, int r, int c)
 {
-  int a_nr = a.rows ();
-  int a_nc = a.cols ();
-  if (r < 0 || r + a_nr - 1 > rows () || c < 0 || c + a_nc - 1 > cols ())
-    {
-      (*current_liboctave_error_handler) ("range error for insert");
-      return *this;
-    }
-
-  for (int j = 0; j < a_nc; j++)
-    for (int i = 0; i < a_nr; i++)
-      elem (r+i, c+j) = a.elem (i, j);
-
+  Array2<Complex>::insert (a, r, c);
   return *this;
 }