# HG changeset patch # User jwe # Date 1179328699 0 # Node ID 7e2b5d0cf7add3c6591ea99d205b1f73f7f085a2 # Parent d88d66f8cab65883f789d6b7b7afef00e7105a63 [project @ 2007-05-16 15:18:18 by jwe] diff --git a/liboctave/CRowVector.cc b/liboctave/CRowVector.cc --- a/liboctave/CRowVector.cc +++ b/liboctave/CRowVector.cc @@ -526,14 +526,8 @@ } else if (n == 1) { - if (x1 == x2) - { - retval.resize (1); - retval.elem (0) = x1; - } - else - (*current_liboctave_error_handler) - ("linspace: npoints is 1, but x1 != x2"); + retval.resize (1); + retval.elem (0) = x2; } else (*current_liboctave_error_handler) diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2007-05-16 David Bateman + + * dRowVector.cc (linspace): Return second argument if fewer than + two values are requested. + * CRowVector.cc (linspace): Likewise. + 2007-04-27 John W. Eaton * lo-mappers.cc (signum (const Complex&)): Special case for (0, 0). diff --git a/liboctave/dRowVector.cc b/liboctave/dRowVector.cc --- a/liboctave/dRowVector.cc +++ b/liboctave/dRowVector.cc @@ -335,14 +335,8 @@ } else if (n == 1) { - if (x1 == x2) - { - retval.resize (1); - retval.elem (0) = x1; - } - else - (*current_liboctave_error_handler) - ("linspace: npoints is 1, but x1 != x2"); + retval.resize (1); + retval.elem (0) = x2; } else (*current_liboctave_error_handler) diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2007-05-16 John W. Eaton + + * general/logspace.m: Return second arg if fewer than two values + are requested. + 2007-05-14 John W. Eaton * plot/__go_draw_figure__.m: Ensure that a reset commands starts diff --git a/scripts/general/logspace.m b/scripts/general/logspace.m --- a/scripts/general/logspace.m +++ b/scripts/general/logspace.m @@ -77,10 +77,6 @@ print_usage (); endif - if (npoints < 2) - error ("logspace: npoints must be greater than 2"); - endif - if (length (x1) == 1 && length (x2) == 1) x2_tmp = x2; if (x2 == pi) diff --git a/src/load-path.h b/src/load-path.h --- a/src/load-path.h +++ b/src/load-path.h @@ -339,7 +339,7 @@ void do_display (std::ostream& os) const; - std::string system_path (void) const { return sys_path; } + std::string do_system_path (void) const { return sys_path; } void add_to_fcn_map (const dir_info& di, bool at_end) const; };