octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Changeset]: Other doc fixes + cellidx


From: David Bateman
Subject: [Changeset]: Other doc fixes + cellidx
Date: Tue, 29 Jul 2008 17:05:49 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080725)

You'll need the attached patch as well to get the documentation to build after the recent documentation changes I made. Also I readded the cellidx function from the control toolbox, so this changeset should be applied after the one discussed in the thread

http://www.nabble.com/Removing-control%2C-finance-and-quaternion-toolboxes-to18671972.html

Regards
David

--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary

# HG changeset patch
# User David Bateman <address@hidden>
# Date 1217343703 -7200
# Node ID 5046e210440d2498297f1bd72e220c3267861e66
# Parent  13e6a9e5e88cadc8ad59cbe7b623e94f7eccf996
Various doc fixes. Readd cellidx

diff --git a/doc/ChangeLog b/doc/ChangeLog
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@ 2008-07-28  David Bateman  <address@hidden
+2008-07-29  David Bateman  <address@hidden>
+
+       * interpreter/numbers.txi, interpreter/plot.txi,
+       interpreter/quad.txi: Miscellaneous documentation fixes.
+
 2008-07-28  David Bateman  <address@hidden>
 
        * interpreter/arith.txi: Document reallog, realpow and realsqrt.
diff --git a/doc/interpreter/numbers.txi b/doc/interpreter/numbers.txi
--- a/doc/interpreter/numbers.txi
+++ b/doc/interpreter/numbers.txi
@@ -681,7 +681,7 @@ returns a single precision value. The mi
 returns a single precision value. The mixed operations that are valid
 and their returned data types are
 
address@hidden @columnfraction .2 .3 .3 .2
address@hidden @columnfractions .2 .3 .3 .2
 @item @tab Mixed Operation @tab  Result @tab 
 @item @tab double OP single @tab single @tab
 @item @tab double OP integer @tab integer @tab
@@ -690,12 +690,13 @@ and their returned data types are
 @item @tab single OP integer @tab integer @tab
 @item @tab single OP char @tab single @tab
 @item @tab single OP logical @tab single @tab
address@hidden multitable
 
 The same logic applies to functions with mixed arguments such as
 
 @example
 min (single (1), 0)
-   @result 0
+   @result{} 0
 @end example
 
 @noindent
@@ -708,11 +709,11 @@ x = ones (2, 2);
 x = ones (2, 2);
 x (1, 1) = single (2)
     @result{} x = 2   1
-            1   1
address@hidden example
-
address@hidden
-where @code{x} remains of the double precision. 
+           1   1
address@hidden example
+
address@hidden
+where @code{x} remains of the double precision type. 
 
 @node Predicates for Numeric Objects
 @section Predicates for Numeric Objects
diff --git a/doc/interpreter/plot.txi b/doc/interpreter/plot.txi
--- a/doc/interpreter/plot.txi
+++ b/doc/interpreter/plot.txi
@@ -181,6 +181,10 @@ function.
 
 @DOCSTRING(caxis)
 
address@hidden
+* Two-dimensional Function Plotting::
address@hidden menu
+
 @node Two-dimensional Function Plotting
 @subsubsection Two-dimensional Function Plotting
 
@@ -284,8 +288,12 @@ three-dimensional plots.
 
 @DOCSTRING(shading)
 
address@hidden Two-dimensional Function Plotting
address@hidden Two-dimensional Function Plotting
address@hidden
+* Three-dimensional Function Plotting::
address@hidden menu
+
address@hidden Three-dimensional Function Plotting
address@hidden Three-dimensional Function Plotting
 
 @DOCSTRING(ezplot3)
 
diff --git a/doc/interpreter/quad.txi b/doc/interpreter/quad.txi
--- a/doc/interpreter/quad.txi
+++ b/doc/interpreter/quad.txi
@@ -230,7 +230,7 @@ variables. For example
 variables. For example
 
 @example
-I =  dblquad (@(x, y) sin(pi.*x.*y).*sqrt(x.*y), 0, 1, 0, 1)
+I =  dblquad (@@(x, y) sin(pi.*x.*y).*sqrt(x.*y), 0, 1, 0, 1)
       @result{} 0.30022
 @end example
 
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,11 @@ 2008-07-28  Ben Abbott <address@hidden
+2008-07-29  David Bateman  <address@hidden>
+
+       * general/cellidx.m: reinclude from control toolbox, as used by
+       print command. Replace is_signal_list with iscellstr.
+       * general/quadqk.m, linear-algebra/planeror.m,
+       miscellaneous/namelengthmax.m, specfun/realpow.m: Miscellaneous
+       documentation fixes.
+
 2008-07-28  Ben Abbott <address@hidden>
 
        * plot/hold.m: Clarify help text.
diff --git a/scripts/general/cellidx.m b/scripts/general/cellidx.m
new file mode 100644
--- /dev/null
+++ b/scripts/general/cellidx.m
@@ -0,0 +1,100 @@
+## Copyright (C) 2000, 2004, 2005, 2006, 2007
+##               Auburn University.  All rights reserved.
+##
+## This file is part of Octave.
+##
+## Octave program 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 3 of the License, or (at
+## your option) any later version.
+##
+## Octave program 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, see
+## <http://www.gnu.org/licenses/>.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} address@hidden, @var{errmsg}] =} cellidx 
(@var{listvar}, @var{strlist})
+## Return indices of string entries in @var{listvar} that match strings
+## in @var{strlist}.
+##
+## Both @var{listvar} and @var{strlist} may be passed as strings or
+## string matrices.  If they are passed as string matrices, each entry
+## is processed by @code{deblank} prior to searching for the entries.
+##
+## The first output is the vector of indices in @var{listvar}.
+##
+## If @var{strlist} contains a string not in @var{listvar}, then
+## an error message is returned in @var{errmsg}.  If only one output
+## argument is requested, then @var{cellidx} prints @var{errmsg} to the
+## screen and exits with an error.
+## @end deftypefn
+
+function [idxvec,errmsg]  = cellidx (listvar, strlist)
+
+  if (nargin != 2)
+    print_usage ();
+  endif
+
+  if (ischar (strlist))
+    tmp = strlist;
+    strlist = {};
+    for kk = 1:rows(tmp)
+      strlist{kk} = deblank (tmp(kk,:));
+    endfor
+  endif
+
+  if (ischar (listvar))
+    tmp = listvar;
+    listvar = {};
+    for kk = 1:rows(tmp)
+      listvar{kk} = deblank (tmp(kk,:));
+    endfor
+  endif
+
+  ## initialize size of idxvec (for premature return)
+  idxvec = zeros (length(strlist), 1);
+
+  errmsg = "";
+  if (! iscellstr (listvar))
+    errmsg = "listvar must be a list of strings";
+  elseif (! iscellstr (strlist))
+    errmsg = "strlist must be a list of strings";
+  endif
+
+  if (length (errmsg))
+    if (nargout < 2)
+      error (errmsg);
+    else
+      return;
+    endif
+  endif
+
+  nsigs = length(listvar);
+  for idx = 1:length(strlist)
+    signame = strlist{idx};
+    for jdx = 1:nsigs
+      if (strcmp (signame, listvar{jdx}) )
+       if (idxvec(idx) != 0)
+         warning ("Duplicate signal name %s (%d,%d)\n",
+                  listvar{jdx}, jdx, idxvec(idx));
+       else
+         idxvec(idx) = jdx;
+       endif
+      endif
+    endfor
+    if (idxvec(idx) == 0)
+      errmsg = sprintf ("Did not find %s", signame);
+      if (nargout == 1)
+       error (errmsg);
+      else
+       break;
+      endif
+    endif
+  endfor
+
+endfunction
diff --git a/scripts/general/quadgk.m b/scripts/general/quadgk.m
--- a/scripts/general/quadgk.m
+++ b/scripts/general/quadgk.m
@@ -32,7 +32,7 @@
 ## The function @var{f} can be defined in terms of a function handle,
 ## inline function or string.
 ##
-## The bounds of the quadrature @address@hidden, @var{b}] can be finite
+## The bounds of the quadrature @address@hidden, @var{b}]} can be finite
 ## or infinite and contain weak end singularities. Variable
 ## transformation will be used to treat infinite intervals and weaken
 ## the singularities. For example
diff --git a/scripts/linear-algebra/planerot.m 
b/scripts/linear-algebra/planerot.m
--- a/scripts/linear-algebra/planerot.m
+++ b/scripts/linear-algebra/planerot.m
@@ -21,7 +21,7 @@
 ## Given a two-element column vector, returns the
 ## @iftex
 ## @tex
-## $2\\times 2$ orthogonal matrix
+## $2 \times 2$ orthogonal matrix
 ## @end tex
 ## @end iftex
 ## @ifnottex
diff --git a/scripts/miscellaneous/namelengthmax.m 
b/scripts/miscellaneous/namelengthmax.m
--- a/scripts/miscellaneous/namelengthmax.m
+++ b/scripts/miscellaneous/namelengthmax.m
@@ -24,7 +24,7 @@
 ## @tex
 ## $2^{31} - 1$
 ## @end tex
-## @end iftext
+## @end iftex
 ## @ifnottex
 ## @code{2 ^ 31 - 1}
 ## @end ifnottex
diff --git a/scripts/specfun/realpow.m b/scripts/specfun/realpow.m
--- a/scripts/specfun/realpow.m
+++ b/scripts/specfun/realpow.m
@@ -19,9 +19,9 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} realpow (@var{x}, @var{y})
 ## Return the element by element power operator. This is equivalent to
-## @address@hidden .^ @var{y}), except that if the return value
+## @address@hidden .^ @var{y}}, except that if the return value
 ## is complex @code{realpow} produces an error.
-## @seealso{log, reallog, realsqrt}
+## @seealso{pow, reallog, realsqrt}
 ## @end deftypefn
 
 function z = realpow (x, y)
diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@ 2008-07-28  David Bateman  <address@hidden
+2008-07-29  David Bateman  <address@hidden>
+
+       * ov-flt-re-mat.cc (Fsingle): Documentation fix.
+
 2008-07-28  David Bateman  <address@hidden>
 
        * error.cc (last_error_id, last_error_message, last_warning_id,
diff --git a/src/ov-flt-re-mat.cc b/src/ov-flt-re-mat.cc
--- a/src/ov-flt-re-mat.cc
+++ b/src/ov-flt-re-mat.cc
@@ -780,7 +780,7 @@ ARRAY_MAPPER (isnan, FloatNDArray::bmapp
 
 DEFUN (single, args, ,
   "-*- texinfo -*-\n\
address@hidden {Built-in Function} {} double (@var{x})\n\
address@hidden {Built-in Function} {} single (@var{x})\n\
 Convert @var{x} to single precision type.\n\
 @end deftypefn")
 {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]