changeset 6999:9325d3f604a3

[project @ 2007-10-10 17:03:34 by jwe]
author jwe
date Wed, 10 Oct 2007 17:03:35 +0000
parents cc049a392a97
children e87f860624cc
files src/ChangeLog src/data.cc src/ov-range.h
diffstat 3 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Oct 10 16:53:23 2007 +0000
+++ b/src/ChangeLog	Wed Oct 10 17:03:35 2007 +0000
@@ -1,3 +1,8 @@
+2007-10-10  Kim Hansen  <kimhanse@gmail.com>
+
+        * data.cc (Fsqueeze): Document 2d behaviour.
+        * ov-range.h (octave_range::squeeze): New function.
+
 2007-10-09  John W. Eaton  <jwe@octave.org>
 
 	* DLD-FUNCTIONS/urlwrite.cc (urlget_cleanup): New function.
--- a/src/data.cc	Wed Oct 10 16:53:23 2007 +0000
+++ b/src/data.cc	Wed Oct 10 17:03:35 2007 +0000
@@ -2579,6 +2579,8 @@
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} squeeze (@var{x})\n\
 Remove singleton dimensions from @var{x} and return the result.\n\
+Note that for compatibility with @sc{Matlab}, all objects have\n\
+a minimum of two dimensions.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/src/ov-range.h	Wed Oct 10 16:53:23 2007 +0000
+++ b/src/ov-range.h	Wed Oct 10 17:03:35 2007 +0000
@@ -120,6 +120,8 @@
   octave_value permute (const Array<int>& vec, bool inv = false) const
     { return NDArray (array_value().permute (vec, inv)); }
 
+  octave_value squeeze (void) const { return range; }
+
   bool is_defined (void) const { return true; }
 
   bool is_constant (void) const { return true; }