# HG changeset patch # User jwe # Date 792727011 0 # Node ID 38dabbe2feb5d49fc1905eb9217357716e0d58e7 # Parent 3b6f6c5217e75ad51201e66b25653979b5e7b09e [project @ 1995-02-14 01:56:51 by jwe] diff -r 3b6f6c5217e7 -r 38dabbe2feb5 liboctave/CRowVector.cc --- a/liboctave/CRowVector.cc Tue Feb 14 01:45:09 1995 +0000 +++ b/liboctave/CRowVector.cc Tue Feb 14 01:56:51 1995 +0000 @@ -604,6 +604,24 @@ elem (i) = f (elem (i)); } +ComplexRowVector +linspace (const Complex& x1, const Complex& x2, int n) +{ + ComplexRowVector retval; + + if (n > 0) + { + retval.resize (n); + Complex delta = (x2 - x1) / (n - 1); + retval.elem (0) = x1; + for (int i = 1; i < n-1; i++) + retval.elem (i) = x1 + i * delta; + retval.elem (n-1) = x2; + } + + return retval; +} + Complex ComplexRowVector::min (void) const {