changeset 6945:6bbf56a9718a

[project @ 2007-10-02 20:47:22 by jwe]
author jwe
date Tue, 02 Oct 2007 20:47:23 +0000
parents 96714c92a278
children 10c7a803b409
files scripts/control/base/__bodquist__.m scripts/control/base/__freqresp__.m scripts/control/base/__stepimp__.m scripts/control/system/__abcddims__.m scripts/control/system/__syschnamesl__.m scripts/control/system/__sysconcat__.m scripts/control/system/__syscont_disc__.m scripts/control/system/__sysdefioname__.m scripts/control/system/__sysdefstname__.m scripts/control/system/__sysgroupn__.m scripts/control/system/__tf2sysl__.m scripts/control/system/__tfl__.m scripts/control/system/__zp2ssg2__.m scripts/control/util/__outlist__.m scripts/control/util/__zgpbal__.m scripts/general/__isequal__.m scripts/general/__splinen__.m scripts/image/__img__.m scripts/image/__img_via_file__.m scripts/optimization/__fsolve_defopts__.m src/DLD-FUNCTIONS/__contourc__.cc src/DLD-FUNCTIONS/__delaunayn__.cc src/DLD-FUNCTIONS/__dsearchn__.cc src/DLD-FUNCTIONS/__glpk__.cc src/DLD-FUNCTIONS/__lin_interpn__.cc src/DLD-FUNCTIONS/__pchip_deriv__.cc src/DLD-FUNCTIONS/__qp__.cc src/DLD-FUNCTIONS/__voronoi__.cc src/data.cc src/graphics.cc src/input.cc src/octave.cc src/variables.cc
diffstat 33 files changed, 239 insertions(+), 164 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/control/base/__bodquist__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/base/__bodquist__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{f}, @var{w}, @var{rsys}] =} __bodquist__ (@var{sys}, @var{w}, @var{out_idx}, @var{in_idx})
 ## Used internally by @command{bode}, @command{nyquist}; compute system frequency response.
--- a/scripts/control/base/__freqresp__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/base/__freqresp__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __freqresp__ (@var{sys}, @var{USEW}, @var{w})
 ## Frequency response function - used internally by @command{bode}, @command{nyquist}.
--- a/scripts/control/base/__stepimp__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/base/__stepimp__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{y}, @var{t}] =} __stepimp__ (@var{sitype}, @var{sys} [, @var{inp}, @var{tstop}, @var{n}])
 ## Impulse or step response for a linear system.
--- a/scripts/control/system/__abcddims__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__abcddims__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{y}, @var{my}, @var{ny}] =} __abcddims__ (@var{x})
 ##
--- a/scripts/control/system/__syschnamesl__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__syschnamesl__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __syschnamesl__ (@var{olist}, @var{old_names}, @var{inames}, @var{listname})
 ## used internally in syschnames
--- a/scripts/control/system/__sysconcat__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__sysconcat__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -1,23 +1,44 @@
-function c = __sysconcat__(a,b)
-  # c = __sysconcat__(a,b)
-  # cell array replacement for append, used by control systems toolbox
+## Copyright (C) 1996, 1998 Auburn University.  All rights reserved.
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by the
+## Free Software Foundation; either version 2, or (at your option) any
+## later version.
+##
+## Octave is distributed in the hope that it will be useful, but WITHOUT
+## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, write to the Free
+## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301 USA.
 
-  if(ischar(a))
+## Undocumented internal function.
+
+function c = __sysconcat__ (a, b)
+
+  ## c = __sysconcat__ (a, b)
+  ## cell array replacement for append, used by control systems toolbox
+
+  if (ischar (a))
     a = {a};
   endif
-  if(ischar(b))
+  if (ischar (b))
     b = {b};
   endif
 
-  if ( ! ( is_signal_list(a)  && is_signal_list(b) ) )
+  if (! (is_signal_list (a) && is_signal_list (b)))
     error("need cell arrays of strings");
   endif
 
   c = a;
-  la = length(a);
-  for ii=1:length(b)
+  la = length (a);
+  for ii = 1:length (b)
     c{la+ii} = b{ii};
   endfor
 
 endfunction
-
--- a/scripts/control/system/__syscont_disc__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__syscont_disc__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{n_tot}, @var{st_c}, @var{st_d}, @var{y_c}, @var{y_d}] =} __syscont_disc__ (@var{sys})
 ## Used internally in syscont and sysdisc.
--- a/scripts/control/system/__sysdefioname__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__sysdefioname__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __sysdefioname__ (@var{n}, @var{str}, @var{m})
 ## return default input or output names given @var{n}, @var{str}, @var{m}.
--- a/scripts/control/system/__sysdefstname__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__sysdefstname__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __sysdefstname__ (@var{n}, @var{nz})
 ## return default state names given @var{n}, @var{nz}
--- a/scripts/control/system/__sysgroupn__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__sysgroupn__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __sysgroupn__ (@var{names})
 ## Locate and mark duplicate names
--- a/scripts/control/system/__tf2sysl__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__tf2sysl__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __tf2sysl__ (@var{vec})
 ## used internally in tf2sys.
--- a/scripts/control/system/__tfl__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__tfl__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __tfl__ (@var{vec})
 ## used internally in tf.
--- a/scripts/control/system/__zp2ssg2__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/system/__zp2ssg2__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{poly}, @var{rvals}] =} __zp2ssg2__ (@var{rvals})
 ## Used internally in @code{zp2ss}
--- a/scripts/control/util/__outlist__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/util/__outlist__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __outlist__ (@var{lmat}, @var{tabchar}, @var{yd}, @var{ilist})
 ## Prints an enumerated list of strings.
--- a/scripts/control/util/__zgpbal__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/control/util/__zgpbal__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301 USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __zgpbal__ (@var{sys})
 ##
--- a/scripts/general/__isequal__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/general/__isequal__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -15,6 +15,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __isequal__ (@var{nans_compare_equal}, @var{x1}, @var{x2}, @dots{})
 ## Return true if @var{x1}, @var{x2}, @dots{} are all equal and
--- a/scripts/general/__splinen__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/general/__splinen__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{yi} = } __splinen__ (@var{x}, @var{y}, @var{xi})
 ## Internal support function for multi-dimensional splines.
--- a/scripts/image/__img__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/image/__img__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __img__ (@var{img})
 ## @deftypefnx {Function File} {} __img__ (@var{x}, @var{y}, @var{img})
--- a/scripts/image/__img_via_file__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/image/__img_via_file__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __img_via_file__(@var{x}, @var{y}, @var{im}, @var{zoom}, @var{command})
 ## Display an image by saving it to a file in PPM format and launching
--- a/scripts/optimization/__fsolve_defopts__.m	Tue Oct 02 16:53:00 2007 +0000
+++ b/scripts/optimization/__fsolve_defopts__.m	Tue Oct 02 20:47:23 2007 +0000
@@ -17,6 +17,8 @@
 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 
+## Undocumented internal function.
+
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} __fsolve_defopts__ ()
 ## @end deftypefn
--- a/src/DLD-FUNCTIONS/__contourc__.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/DLD-FUNCTIONS/__contourc__.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -300,6 +300,7 @@
 DEFUN_DLD (__contourc__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {} __contourc__ (@var{x}, @var{y}, @var{z}, @var{levels})\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/src/DLD-FUNCTIONS/__delaunayn__.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/DLD-FUNCTIONS/__delaunayn__.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -61,25 +61,27 @@
 DEFUN_DLD (__delaunayn__, args, ,
 	   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{T} =} __delaunayn__ (@var{P}[, @var{opt}])\n\
-Internal function for delaunayn.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 
 {
   octave_value_list retval;
+
 #ifdef HAVE_QHULL
+
   retval(0) = 0.0;
   std::string options = "";
 
-  int nargin = args.length();
+  int nargin = args.length ();
   if (nargin < 1 || nargin > 2)
     {
       print_usage ();
       return retval;
     }
 
-  Matrix p(args(0).matrix_value());
-  const octave_idx_type dim = p.columns();
-  const octave_idx_type n = p.rows();
+  Matrix p (args(0).matrix_value ());
+  const octave_idx_type dim = p.columns ();
+  const octave_idx_type n = p.rows ();
 
   // default options
   if (dim <= 3)
@@ -90,30 +92,30 @@
 
   if (nargin == 2)
     {
-    if (args(1).is_empty())
+    if (args(1).is_empty ())
       {
 	// keep default options
       }
-    else if ( args(1).is_string ()) 
+    else if (args(1).is_string ()) 
       {
 	// option string is directly provided
-	options = args(1).string_value();
+	options = args(1).string_value ();
       }
-    else if ( args(1).is_cell ()) 
+    else if (args(1).is_cell ()) 
       {
 	options = "";
 
-	Cell c =  args(1).cell_value();
-	for (octave_idx_type i = 0; i < c.numel(); i++)
+	Cell c = args(1).cell_value ();
+	for (octave_idx_type i = 0; i < c.numel (); i++)
 	  {
 
-	    if (!c.elem(i).is_string()) 
+	    if (! c.elem(i).is_string ()) 
 	      {
 		error ("__delaunayn__: all options must be strings");
 		return retval;
 	      }
 
-	    options = options + c.elem(i).string_value() + " ";
+	    options = options + c.elem(i).string_value () + " ";
 	  }
       }
     else 
@@ -127,104 +129,97 @@
 
   if (n > dim + 1) 
     {
-      p = p.transpose();
-      double *pt_array = p.fortran_vec();
-      boolT ismalloc = False;
+      p = p.transpose ();
+      double *pt_array = p.fortran_vec ();
+      boolT ismalloc = false;
 
       OCTAVE_LOCAL_BUFFER (char, flags, 250);
 
-      sprintf(flags,"qhull d %s",options.c_str());
+      sprintf (flags, "qhull d %s", options.c_str ());
 
-      // If you want some debugging information replace the NULL
-      // pointer with outfile.
+      // If you want some debugging information replace the 0 pointer
+      // with stdout or some other file open for writing.
 
-      FILE *outfile = stdout;
+      FILE *outfile = 0;
       FILE *errfile = stderr;
 
-      int exitcode =  qh_new_qhull (dim, n, pt_array, ismalloc, flags, 
-				    NULL, errfile);
-
-      if (exitcode)
+      if (! qh_new_qhull (dim, n, pt_array, ismalloc, flags, outfile, errfile))
 	{
-	  error("__delaunayn__: qhull failed.");
-	  return retval;
-	}
-
-      // triangulate non-simplicial facets
-      qh_triangulate(); 
+	  // triangulate non-simplicial facets
+	  qh_triangulate (); 
 
-      facetT *facet;
-      vertexT *vertex, **vertexp;
-      octave_idx_type nf = 0, i = 0;
+	  facetT *facet;
+	  vertexT *vertex, **vertexp;
+	  octave_idx_type nf = 0, i = 0;
 
-      FORALLfacets
-	{
-	  if (!facet->upperdelaunay)
-	    nf++;
-
-	  // Double check
-	  if (!facet->simplicial) 
+	  FORALLfacets
 	    {
-	      error("__delaunayn__: Qhull returned non-simplicial facets.\n",
-		    "Try delaunayn with different options.");
-	      break;
+	      if (! facet->upperdelaunay)
+		nf++;
+
+	      // Double check
+	      if (! facet->simplicial) 
+		{
+		  error ("__delaunayn__: Qhull returned non-simplicial facets -- try delaunayn with different options");
+		  break;
+		}
 	    }
-	}
+
+	  Matrix simpl (nf, dim+1);
 
-    if (!error_state) 
-      {
-	Matrix simpl(nf, dim+1);
-	FORALLfacets
-	  {
-	    if (!facet->upperdelaunay) 
-	      {
-		octave_idx_type j = 0;
-		FOREACHvertex_ (facet->vertices)
-		  {
-		    // if delaunayn crashes, enable this check
+	  FORALLfacets
+	    {
+	      if (! facet->upperdelaunay) 
+		{
+		  octave_idx_type j = 0;
+
+		  FOREACHvertex_ (facet->vertices)
+		    {
+		      // if delaunayn crashes, enable this check
 #if 0
-		    if (j > dim)
-		      {
-			error("__delaunayn__: internal error. Qhull returned non-simplicial facets.");
-			return retval;
-		      }
+		      if (j > dim)
+			{
+			  error ("__delaunayn__: internal error. Qhull returned non-simplicial facets");
+			  return retval;
+			}
 #endif
 
-		    simpl(i, j++) = 1 + qh_pointid(vertex->point);
-		  }
-		i++;
-	      }
-	  }
-	retval(0) = simpl;
-      }
-    
+		      simpl(i, j++) = 1 + qh_pointid(vertex->point);
+		    }
+		  i++;
+		}
+	    }
+
+	  retval(0) = simpl;
+
+	  // free long memory
+	  qh_freeqhull (! qh_ALL);
 
-    qh_freeqhull(!qh_ALL);
-    //free long memory
-
-    int curlong, totlong;
-    qh_memfreeshort (&curlong, &totlong);
-    //free short memory and memory allocator
+	  // free short memory and memory allocator
+	  int curlong, totlong;
+	  qh_memfreeshort (&curlong, &totlong);
 
-    if (curlong || totlong)
-      {
-	warning("__delaunay__: did not free %d bytes of long memory (%d pieces)",
-		totlong, curlong);
-      }
-    } 
+	  if (curlong || totlong)
+	    warning ("__delaunay__: did not free %d bytes of long memory (%d pieces)",
+		     totlong, curlong);
+	}
+      else
+	error ("__delaunayn__: qhull failed.");
+    }
   else if (n == dim + 1) 
     {
       // one should check if nx points span a simplex
       // I will look at this later.
-      RowVector vec(n);
+      RowVector vec (n);
       for (octave_idx_type i = 0; i < n; i++) 
-	{
-	  vec(i) = i + 1.0;
-	}
+	vec(i) = i + 1.0;
+
       retval(0) = vec;
     }
+
 #else
   error ("__delaunayn__: not available in this version of Octave");
 #endif
+
   return retval;
 }
--- a/src/DLD-FUNCTIONS/__dsearchn__.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/DLD-FUNCTIONS/__dsearchn__.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -35,7 +35,7 @@
 DEFUN_DLD (__dsearchn__, args, ,
 	"-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {[@var{idx}, @var{d}] =} dsearch (@var{x}, @var{xi})\n\
-Internal function for dsearchn.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   int nargin = args.length();
@@ -53,7 +53,7 @@
   if (! error_state)
     {
       if (x.rows() != xi.rows() || x.columns() < 1)
-	error ("__dsearch__: dimensional mismatch.");
+	error ("__dsearch__: dimensional mismatch");
       else
 	{
 	  octave_idx_type n = x.rows();
--- a/src/DLD-FUNCTIONS/__glpk__.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/DLD-FUNCTIONS/__glpk__.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -460,8 +460,7 @@
 DEFUN_DLD (__glpk__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {[@var{values}] =} __glpk__ (@var{args})\n\
-Internal interface for the GNU GLPK library.\n\
-You should be using using the @code{glpk} function instead.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   // The list of values to return.  See the declaration in oct-obj.h
--- a/src/DLD-FUNCTIONS/__lin_interpn__.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/DLD-FUNCTIONS/__lin_interpn__.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -138,20 +138,21 @@
     }
 }
 
+// Perform @var{n}-dimensional interpolation.  Each element of then
+// @var{n}-dimensional array @var{v} represents a value at a location
+// given by the parameters @var{x1}, @var{x2},...,@var{xn}. The parameters
+// @var{x1}, @var{x2}, @dots{}, @var{xn} are either @var{n}-dimensional
+// arrays of the same size as the array @var{v} in the \"ndgrid\" format
+// or vectors.  The parameters @var{y1}, @var{y2}, @dots{}, @var{yn} are
+// all @var{n}-dimensional arrays of the same size and represent the
+// points at which the array @var{vi} is interpolated.
+//
+//This function only performs linear interpolation.
+
 DEFUN_DLD (__lin_interpn__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{vi} =} __lin_interpn__ (@var{x1}, @var{x2}, @dots{}, @var{xn}, @var{v}, @var{y1}, @var{y2}, @dots{}, @var{yn})\n\
-Perform @var{n}-dimensional interpolation.  Each element of then\n\
-@var{n}-dimensional array @var{v} represents a value at a location\n\
-given by the parameters @var{x1}, @var{x2},...,@var{xn}. The parameters\n\
-@var{x1}, @var{x2}, @dots{}, @var{xn} are either @var{n}-dimensional\n\
-arrays of the same size as the array @var{v} in the \"ndgrid\" format\n\
-or vectors.  The parameters @var{y1}, @var{y2}, @dots{}, @var{yn} are\n\
-all @var{n}-dimensional arrays of the same size and represent the\n\
-points at which the array @var{vi} is interpolated.\n\
-\n\
-This function only performs linear interpolation.\n\
-@seealso{interp1, interp2, ndgrid}\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/src/DLD-FUNCTIONS/__pchip_deriv__.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/DLD-FUNCTIONS/__pchip_deriv__.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -40,11 +40,13 @@
 			     octave_idx_type *ierr);
 }
 
+// Wrapper for SLATEC/PCHIP function DPCHIM to calculate the derivates
+// for piecewise polynomials.
+
 DEFUN_DLD (__pchip_deriv__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {} __pchip_deriv__ (@var{x}, @var{y})\n\
-Wrapper for SLATEC/PCHIP function DPCHIM to calculate the derivates for\n\
-piecewise polynomials.  You should be using @code{pchip} function instead.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/src/DLD-FUNCTIONS/__qp__.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/DLD-FUNCTIONS/__qp__.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -465,7 +465,10 @@
 }
 
 DEFUN_DLD (__qp__, args, ,
-  "[x, lambda, info, iter] = __qp__ (x0, H, q, Aeq, beq, Ain, bin, maxit)")
+  "-*- texinfo -*-\n\
+@deftypefn {Loadable Function} {[@var{x}, @var{lambda}, @var{info}, @var{iter}] =} __qp__ (@var{x0}, @var{H}, @var{q}, @var{Aeq}, @var{beq}, @var{Ain}, @var{bin}, @var{maxit})\n\
+Undocumented internal function.\n\
+@end deftypefn")
 {
   octave_value_list retval;
 
--- a/src/DLD-FUNCTIONS/__voronoi__.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/DLD-FUNCTIONS/__voronoi__.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -52,14 +52,16 @@
         "-*- texinfo -*-\n\
 @deftypefn {Loadable Function} {@var{tri} =} __voronoi__ (@var{point})\n\
 @deftypefnx {Loadable Function} {@var{tri} =} __voronoi__ (@var{point}, @var{options})\n\
-Internal function for voronoi.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value_list retval;
+
 #ifdef HAVE_QHULL
+
   retval(0) = 0.0;
 
-  int nargin = args.length();
+  int nargin = args.length ();
   if (nargin < 1 || nargin > 2) 
     {
       print_usage ();
@@ -70,23 +72,25 @@
 
   if (nargin == 2) 
     {
-      if (!args (1).is_string ()) 
+      if (! args (1).is_string ()) 
 	{
 	  error ("__voronoi__: second argument must be a string");
 	  return retval;
 	}
-      options = args (1).string_value().c_str();
+
+      options = args (1).string_value().c_str ();
     }
   else
     options = "";
 
-  Matrix p(args(0).matrix_value());
+  Matrix p (args(0).matrix_value ());
 
-  const octave_idx_type dim = p.columns();
-  const octave_idx_type np = p.rows();
-  p = p.transpose();
+  const octave_idx_type dim = p.columns ();
+  const octave_idx_type np = p.rows ();
+  p = p.transpose ();
 
-  double *pt_array = p.fortran_vec();
+  double *pt_array = p.fortran_vec ();
+
   //double  pt_array[dim * np];
   //for (int i = 0; i < np; i++) 
   //  {
@@ -98,54 +102,55 @@
 
   boolT ismalloc = false;
 
-  OCTAVE_LOCAL_BUFFER(char, flags, 250);
+  OCTAVE_LOCAL_BUFFER (char, flags, 250);
 
   // hmm  lot's of options for qhull here
-  sprintf(flags,"qhull v Fv T0 %s",options);
+  sprintf (flags, "qhull v Fv T0 %s", options);
 
-  // If you want some debugging information replace the NULL
-  // pointer with outfile.
-  FILE *outfile = stdout;
+  // If you want some debugging information replace the 0 pointer
+  // with stdout or some other file open for writing.
+
+  FILE *outfile = 0;
   FILE *errfile = stderr;
 
-  if (!qh_new_qhull (dim, np, pt_array, ismalloc, flags, NULL, errfile)) 
+  if (! qh_new_qhull (dim, np, pt_array, ismalloc, flags, outfile, errfile)) 
     {
-
-      // If you want some debugging information replace the NULL
-      // pointer with outfile.
       facetT *facet;
       vertexT *vertex;
 
       octave_idx_type i = 0, n = 1, k = 0, m = 0, fidx = 0, j = 0, r = 0;
-      OCTAVE_LOCAL_BUFFER(octave_idx_type, ni, np);
+      OCTAVE_LOCAL_BUFFER (octave_idx_type, ni, np);
       
       for (i = 0; i < np; i++) 
 	ni[i] = 0;
-      qh_setvoronoi_all();
+      qh_setvoronoi_all ();
       bool infinity_seen = false;
-      facetT *neighbor,**neighborp;
+      facetT *neighbor, **neighborp;
       coordT *voronoi_vertex;
+
       FORALLfacets 
 	{
 	  facet->seen = false;
 	}
+
       FORALLvertices 
 	{
 	  if (qh hull_dim == 3)
-	    qh_order_vertexneighbors(vertex);
+	    qh_order_vertexneighbors (vertex);
 	  infinity_seen = false;
-	  FOREACHneighbor_(vertex)
+
+	  FOREACHneighbor_ (vertex)
 	    {
-	      if (!neighbor->upperdelaunay)
+	      if (! neighbor->upperdelaunay)
 		{
-		  if (!neighbor->seen)
+		  if (! neighbor->seen)
 		    {
 		      n++;
-		      neighbor->seen=True;
+		      neighbor->seen = true;
 		    }
 		  ni[k]++;
 		}
-	      else if (!infinity_seen)
+	      else if (! infinity_seen)
 		{
 		  infinity_seen = true;
 		  ni[k]++;
@@ -154,32 +159,35 @@
 	  k++;
 	}
 
-      Matrix v(n, dim);
+      Matrix v (n, dim);
       for (octave_idx_type d = 0; d < dim; d++)
 	v(0,d) = octave_Inf;
 
-      boolMatrix AtInf(np, 1);
+      boolMatrix AtInf (np, 1);
       for (i = 0; i < np; i++) 
 	AtInf(i) = false;
       octave_value_list F;
       k = 0;
       i = 0;
+
       FORALLfacets 
 	{
 	  facet->seen = false;
 	}
+
       FORALLvertices
 	{
 	  if (qh hull_dim == 3)
 	    qh_order_vertexneighbors(vertex);
 	  infinity_seen = false;
-	  RowVector facet_list(ni[k++]);
+	  RowVector facet_list (ni[k++]);
 	  m = 0;
+
 	  FOREACHneighbor_(vertex)
 	    {
 	      if (neighbor->upperdelaunay)
 		{
-		  if (!infinity_seen)
+		  if (! infinity_seen)
 		    {
 		      infinity_seen = true;
 		      facet_list(m++) = 1;
@@ -188,7 +196,7 @@
 		} 
 	      else 
 		{
-		  if (!neighbor->seen)
+		  if (! neighbor->seen)
 		    {
 		      voronoi_vertex = neighbor->center;
 		      fidx = neighbor->id;
@@ -200,7 +208,7 @@
 		      neighbor->seen = true;
 		      neighbor->visitid = i;
 		    }
-		  facet_list(m++)=neighbor->visitid + 1;
+		  facet_list(m++) = neighbor->visitid + 1;
 		}
 	    }
 	  F(r++) = facet_list;
@@ -215,19 +223,22 @@
       retval(1) = C;
       retval(2) = AtInf;
 
-      //free long memory
-      qh_freeqhull(!qh_ALL);
+      // free long memory
+      qh_freeqhull (! qh_ALL);
 
-      //free short memory and memory allocator
+      // free short memory and memory allocator
       int curlong, totlong;
       qh_memfreeshort (&curlong, &totlong);
 
-      if (curlong || totlong) {
-	warning("__voronoi__: did not free %d bytes of long memory (%d pieces)", totlong, curlong);
-      }
+      if (curlong || totlong)
+	warning ("__voronoi__: did not free %d bytes of long memory (%d pieces)", totlong, curlong);
     }
+  else
+    error ("__voronoi__: qhull failed");
+
 #else
   error ("__voronoi__: not available in this version of Octave");
 #endif
+
   return retval;
 }
--- a/src/data.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/data.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -2614,10 +2614,12 @@
   return retval;
 }
 
+// Compute various norms of the vector X.
+
 DEFUN (__vnorm__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __vnorm__ (@var{x}, @var{p})\n\
-Compute various norms of the vector @var{x}.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/src/graphics.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/graphics.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -2632,7 +2632,7 @@
 DEFUN (__go_figure__, args, ,
    "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_figure__ (@var{fignum})\n\
-Create a figure graphics object.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -2696,7 +2696,7 @@
 DEFUN (__go_axes__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_axes__ (@var{parent})\n\
-Create an axes graphics object.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   GO_BODY (axes);
@@ -2705,7 +2705,7 @@
 DEFUN (__go_line__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_line__ (@var{parent})\n\
-Create a line graphics object.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   GO_BODY (line);
@@ -2714,7 +2714,7 @@
 DEFUN (__go_text__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_text__ (@var{parent})\n\
-Create a text graphics object.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   GO_BODY (text);
@@ -2723,7 +2723,7 @@
 DEFUN (__go_image__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_image__ (@var{parent})\n\
-Create an image graphics object.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   GO_BODY (image);
@@ -2732,7 +2732,7 @@
 DEFUN (__go_surface__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_surface__ (@var{parent})\n\
-Create a surface graphics object.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   GO_BODY (surface);
@@ -2741,7 +2741,7 @@
 DEFUN (__go_patch__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_patch__ (@var{parent})\n\
-Create a patch graphics object.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   GO_BODY (patch);
@@ -2750,6 +2750,7 @@
 DEFUN (__go_delete__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_delete__ (@var{h})\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -2791,7 +2792,7 @@
 DEFUN (__go_axes_init__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_axes_init__ (@var{h}, @var{mode})\n\
-Initialize axes object.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -2839,7 +2840,7 @@
 DEFUN (__go_handles__, , ,
    "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_handles__ ()\n\
-Return current list of function handles.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   return octave_value (gh_manager::handle_list ());
@@ -2848,7 +2849,7 @@
 DEFUN (__go_figure_handles__, , ,
    "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __go_figure_handles__ ()\n\
-Return current list of function handles.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   return octave_value (gh_manager::figure_handle_list ());
--- a/src/input.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/input.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -1265,7 +1265,7 @@
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __request_drawnow__ ()\n\
 @deftypefnx {Built-in Function} {} __request_drawnow__ (@var{flag})\n\
-Request a call drawnow at the next user prompt.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/src/octave.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/octave.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -227,6 +227,7 @@
 DEFUN (__version_info__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {retval =} __version_info__ (@var{name}, @var{version}, @var{release}, @var{date})\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value retval;
--- a/src/variables.cc	Tue Oct 02 16:53:00 2007 +0000
+++ b/src/variables.cc	Tue Oct 02 20:47:23 2007 +0000
@@ -2541,7 +2541,7 @@
 DEFUN (__print_symtab_info__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __print_symtab_info__ ()\n\
-Print raw symbol table statistices.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -2587,7 +2587,7 @@
 DEFUN (__print_symbol_info__, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} __dump_symbol_info__ (@var{name})\n\
-Print symbol table information for the symbol @var{name}.\n\
+Undocumented internal function.\n\
 @end deftypefn")
 {
   octave_value_list retval;