diff liboctave/Range.cc @ 645:21cb3c7dc9e3

[project @ 1994-08-24 06:19:54 by jwe]
author jwe
date Wed, 24 Aug 1994 06:27:09 +0000
parents 00f8b2242a18
children 714fd17fca28
line wrap: on
line diff
--- a/liboctave/Range.cc	Wed Aug 24 05:19:47 1994 +0000
+++ b/liboctave/Range.cc	Wed Aug 24 06:27:09 1994 +0000
@@ -33,6 +33,24 @@
 #include <limits.h>
 
 #include "Range.h"
+#include "dMatrix.h"
+
+Matrix
+Range::matrix_value (void) const
+{
+  Matrix retval;
+
+  if (rng_nelem > 0)
+    {
+      retval.resize (1, rng_nelem);
+      double b = rng_base;
+      double increment = rng_inc;
+      for (int i = 0; i < rng_nelem; i++)
+	retval.elem (0, i) = b + i * increment;
+    }
+
+  return retval;
+}
 
 // NOTE: max and min only return useful values if nelem > 0.