changeset 18339:1ecfcfa4858e gui-release

maint: Periodic merge of stable to gui-release.
author John W. Eaton <jwe@octave.org>
date Thu, 23 Jan 2014 03:43:11 -0500
parents 770c525a1a2b (current diff) 200851c87444 (diff)
children a91654d70f99 3df71e1d3b24
files doc/interpreter/plot.txi libinterp/parse-tree/lex.ll
diffstat 5 files changed, 54 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/diagperm.txi	Tue Jan 21 18:11:50 2014 +0100
+++ b/doc/interpreter/diagperm.txi	Thu Jan 23 03:43:11 2014 -0500
@@ -18,6 +18,8 @@
 
 @node Diagonal and Permutation Matrices
 @chapter Diagonal and Permutation Matrices
+@cindex diagonal and permutation matrices
+@cindex matrices, diagonal and permutation
 
 @menu
 * Basic Usage::          Creation and Manipulation of Diagonal/Permutation Matrices
@@ -224,6 +226,7 @@
 
 @node Expressions Involving Diagonal Matrices
 @subsection Expressions Involving Diagonal Matrices
+@cindex diagonal matrix expressions
 
 Assume @var{D} is a diagonal matrix.  If @var{M} is a full matrix,
 then @code{D*M} will scale the rows of @var{M}.  That means,
@@ -260,6 +263,7 @@
 i.e., null rows are appended to the result.
 The situation for right-multiplication @code{M*D} is analogous.
 
+@cindex pseudoinverse
 The expressions @code{D \ M} and @code{M / D} perform inverse scaling.
 They are equivalent to solving a diagonal (or rectangular diagonal)
 in a least-squares minimum-norm sense.  In exact arithmetic, this is
@@ -270,12 +274,12 @@
 The matrix division algorithms do, in fact, use division rather than 
 multiplication by reciprocals for better numerical accuracy; otherwise, they
 honor the above definition.  Note that a diagonal matrix is never truncated due
-to ill-conditioning; otherwise, it would not be much useful for scaling.  This
+to ill-conditioning; otherwise, it would not be of much use for scaling.  This
 is typically consistent with linear algebra needs.  A full matrix that only
-happens to be diagonal (an is thus not a special object) is of course treated
+happens to be diagonal (and is thus not a special object) is of course treated
 normally.
 
-Multiplication and division by diagonal matrices works efficiently also when
+Multiplication and division by diagonal matrices work efficiently also when
 combined with sparse matrices, i.e., @code{D*S}, where @var{D} is a diagonal
 matrix and @var{S} is a sparse matrix scales the rows of the sparse matrix and
 returns a sparse matrix.  The expressions @code{S*D}, @code{D\S}, @code{S/D}
@@ -399,6 +403,8 @@
 
 @node Permutation Matrix Functions
 @subsection Permutation Matrix Functions
+@cindex matrix, permutation functions
+@cindex permutation matrix functions
 
 @dfn{inv} and @dfn{pinv} will invert a permutation matrix, preserving its
 specialness.  @dfn{det} can be applied to a permutation matrix, efficiently
@@ -455,7 +461,7 @@
 @end example
 
 @noindent
-Finally, here's how you solve a linear system @code{A*x = b}
+Finally, here's how to solve a linear system @code{A*x = b}
 with Tikhonov regularization (ridge regression) using SVD (a skeleton only):
 
 @example
@@ -477,16 +483,17 @@
 
 @node Zeros Treatment
 @section Differences in Treatment of Zero Elements
+@cindex matrix, zero elements
 
 Making diagonal and permutation matrices special matrix objects in their own
 right and the consequent usage of smarter algorithms for certain operations
 implies, as a side effect, small differences in treating zeros.
-The contents of this section applies also to sparse matrices, discussed in
-the following chapter.
+The contents of this section apply also to sparse matrices, discussed in
+the following chapter. (@pxref{Sparse Matrices})
 
-The IEEE standard defines the result of the expressions @code{0*Inf} and 
-@code{0*NaN} as @code{NaN}, as it has been generally agreed that this is the
-best compromise.
+The IEEE floating point standard defines the result of the expressions @code{0*Inf} and 
+@code{0*NaN} as @code{NaN}. This is widely agreed to be a good
+compromise.
 Numerical software dealing with structured and sparse matrices (including
 Octave) however, almost always makes a distinction between a "numerical zero"
 and an "assumed zero". 
--- a/doc/interpreter/linalg.txi	Tue Jan 21 18:11:50 2014 +0100
+++ b/doc/interpreter/linalg.txi	Thu Jan 23 03:43:11 2014 -0500
@@ -18,6 +18,7 @@
 
 @node Linear Algebra
 @chapter Linear Algebra
+@cindex linear algebra
 
 This chapter documents the linear algebra functions of Octave.
 Reference material for many of these functions may be found in
@@ -34,6 +35,7 @@
 
 @node Techniques Used for Linear Algebra
 @section Techniques Used for Linear Algebra
+@cindex linear algebra, techniques
 
 Octave includes a polymorphic solver, that selects an appropriate
 matrix factorization depending on the properties of the matrix itself. 
@@ -81,6 +83,7 @@
 
 @node Basic Matrix Functions
 @section Basic Matrix Functions
+@cindex matrix functions, basic
 
 @DOCSTRING(balance)
 
@@ -109,6 +112,7 @@
 @DOCSTRING(mgorth)
 
 @DOCSTRING(pinv)
+@cindex pseudoinverse
 
 @DOCSTRING(rank)
 
@@ -120,6 +124,7 @@
 
 @node Matrix Factorizations
 @section Matrix Factorizations
+@cindex matrix factorizations
 
 @DOCSTRING(chol)
 
@@ -173,6 +178,7 @@
 
 @node Functions of a Matrix
 @section Functions of a Matrix
+@cindex matrix, functions of
 
 @DOCSTRING(expm)
 
@@ -188,6 +194,7 @@
 
 @node Specialized Solvers
 @section Specialized Solvers
+@cindex matrix, specialized solvers
 
 @DOCSTRING(bicg)
 
--- a/doc/interpreter/plot.txi	Tue Jan 21 18:11:50 2014 +0100
+++ b/doc/interpreter/plot.txi	Thu Jan 23 03:43:11 2014 -0500
@@ -49,6 +49,7 @@
 
 @node High-Level Plotting
 @section High-Level Plotting
+@cindex plotting, high-level
 
 Octave provides simple means to create many different types of two- and
 three-dimensional plots using high-level functions.
@@ -261,8 +262,9 @@
 
 @node Two-dimensional Function Plotting
 @subsubsection Two-dimensional Function Plotting
-
-Octave can plot a function from a function handle inline function or
+@cindex plotting, two-dimensional functions
+
+Octave can plot a function from a function handle, inline function, or
 string defining the function without the user needing to explicitly
 create the data to be plotted.  The function @code{fplot} also generates
 two-dimensional plots with linear axes using a function name and limits
@@ -300,6 +302,7 @@
 
 @node Three-Dimensional Plots
 @subsection Three-Dimensional Plots
+@cindex plotting, three-dimensional
 
 The function @code{mesh} produces mesh surface plots.  For example,
 
@@ -480,6 +483,7 @@
 
 @node Multiple Plots on One Page
 @subsection Multiple Plots on One Page
+@cindex plotting, multiple plots per figure
 
 Octave can display more than one plot in a single figure.  The simplest
 way to do this is to use the @code{subplot} function to divide the plot
@@ -506,6 +510,7 @@
 
 @node Multiple Plot Windows
 @subsection Multiple Plot Windows
+@cindex plotting, multiple plot windows
 
 You can open multiple plot windows using the @code{figure} function.
 For example,
@@ -527,6 +532,7 @@
 
 @node Manipulation of Plot Windows
 @subsection Manipulation of Plot Windows
+@cindex plotting, window manipulation
 
 By default, Octave refreshes the plot window when a prompt is printed,
 or when waiting for input.  The
@@ -903,6 +909,7 @@
 
 @node Printing and Saving Plots
 @subsection Printing and Saving Plots
+@cindex plotting, saving and printing plots
 @cindex printing plots
 @cindex saving plots
 
@@ -1250,6 +1257,7 @@
 @DOCSTRING(findfigs)
 
 @cindex saving graphics objects
+@cindex graphics objects, saving
 
 Figures can be printed or saved in many graphics formats with @code{print} and
 @code{saveas}.  Occasionally, however, it may be useful to save the original
@@ -2982,8 +2990,8 @@
 object representing the baseline is given by the @code{baseline} property and
 the y-value of the baseline by the @code{basevalue} property.
 
-Changes to any of these property are propagated to the other members of
-the bar series and to the baseline itself.  Equally changes in the
+Changes to any of these properties are propagated to the other members of
+the bar series and to the baseline itself.  Equally, changes in the
 properties of the base line itself are propagated to the members of the
 corresponding bar series.
 
--- a/libinterp/corefcn/urlwrite.cc	Tue Jan 21 18:11:50 2014 +0100
+++ b/libinterp/corefcn/urlwrite.cc	Thu Jan 23 03:43:11 2014 -0500
@@ -554,15 +554,12 @@
     {
       curl.http_action (param, method);
 
-      if (curl.good ())
+      if (nargout > 0)
         {
-          if (nargout > 0)
-            {
-              // Return empty string if no error occured.
-              retval(2) = curl.good () ? "" : curl.lasterror ();
-              retval(1) = curl.good ();
-              retval(0) = buf.str ();
-            }
+          // Return empty string if no error occured.
+          retval(2) = curl.good () ? "" : curl.lasterror ();
+          retval(1) = curl.good ();
+          retval(0) = buf.str ();
         }
 
       if (nargout < 2 && ! curl.good ())
--- a/libinterp/parse-tree/lex.ll	Tue Jan 21 18:11:50 2014 +0100
+++ b/libinterp/parse-tree/lex.ll	Thu Jan 23 03:43:11 2014 -0500
@@ -2311,6 +2311,8 @@
 
   if (kw)
     {
+      bool previous_at_bos = at_beginning_of_statement;
+
       // May be reset to true for some token types.
       at_beginning_of_statement = false;
 
@@ -2358,7 +2360,10 @@
                   && (defining_func
                       && ! (looking_at_return_list
                             || parsed_function_name.top ()))))
-            return 0;
+            {
+              at_beginning_of_statement = previous_at_bos;
+              return 0;
+            }
 
           tok_val = new token (end_kw, token::simple_end, l, c);
           at_beginning_of_statement = true;
@@ -2460,7 +2465,10 @@
           // 'get' and 'set' are keywords in classdef method
           // declarations.
           if (! maybe_classdef_get_set_method)
-            return 0;
+            {
+              at_beginning_of_statement = previous_at_bos;
+              return 0;
+            }
           break;
 
         case enumeration_kw:
@@ -2470,7 +2478,10 @@
           // 'properties', 'methods' and 'events' are keywords for
           // classdef blocks.
           if (! parsing_classdef)
-            return 0;
+            {
+              at_beginning_of_statement = previous_at_bos;
+              return 0;
+            }
           // fall through ...
 
         case classdef_kw: