diff liboctave/Array2.h @ 7620:36594d5bbe13

Move diag function into the octave_value class
author David Bateman <dbateman@free.fr>
date Fri, 21 Mar 2008 00:08:24 +0100
parents 8c32f95c2639
children 82be108cc558
line wrap: on
line diff
--- a/liboctave/Array2.h
+++ b/liboctave/Array2.h
@@ -136,6 +136,11 @@
       return Array2<T> (tmp, tmp.rows (), tmp.columns ());
     }
 
+  Array2<T> diag (octave_idx_type k) const
+  {
+    return Array<T>::diag (k);
+  }
+
   template <class U, class F>
   Array2<U> map (F fcn) const
   {