changeset 24505:9c178e5252e4

maint: merge stable to default.
author Rik <rik@octave.org>
date Wed, 03 Jan 2018 22:00:03 -0800
parents b480fe1089bb (current diff) 5188d936c79a (diff)
children 9d0522881498
files libinterp/corefcn/data.cc libinterp/corefcn/lookup.cc libinterp/corefcn/oct-stream.cc scripts/elfun/atan2d.m scripts/general/logspace.m
diffstat 5 files changed, 31 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/data.cc	Wed Jan 03 17:43:07 2018 -0800
+++ b/libinterp/corefcn/data.cc	Wed Jan 03 22:00:03 2018 -0800
@@ -5064,25 +5064,25 @@
 
 DEFUN (linspace, args, ,
        doc: /* -*- texinfo -*-
-@deftypefn  {} {} linspace (@var{base}, @var{limit})
-@deftypefnx {} {} linspace (@var{base}, @var{limit}, @var{n})
-Return a row vector with @var{n} linearly spaced elements between
-@var{base} and @var{limit}.
-
-If the number of elements is greater than one, then the endpoints @var{base}
-and @var{limit} are always included in the range.  If @var{base} is greater
-than @var{limit}, the elements are stored in decreasing order.  If the
-number of points is not specified, a value of 100 is used.
-
-The @code{linspace} function returns a row vector when both @var{base}
-and @var{limit} are scalars.  If one, or both, inputs are vectors, then
+@deftypefn  {} {} linspace (@var{start}, @var{end})
+@deftypefnx {} {} linspace (@var{start}, @var{end}, @var{n})
+Return a row vector with @var{n} linearly spaced elements between @var{start}
+and @var{end}.
+
+If the number of elements is greater than one, then the endpoints @var{start}
+and @var{end} are always included in the range.  If @var{start} is greater than
+@var{end}, the elements are stored in decreasing order.  If the number of
+points is not specified, a value of 100 is used.
+
+The @code{linspace} function returns a row vector when both @var{start} and
+@var{end} are scalars.  If one, or both, inputs are vectors, then
 @code{linspace} transforms them to column vectors and returns a matrix where
 each row is an independent sequence between
-@w{@code{@var{base}(@var{row_n}), @var{limit}(@var{row_n})}}.
-
-For compatibility with @sc{matlab}, return the second argument (@var{limit})
-if fewer than two values are requested.
-@seealso{logspace}
+@w{@code{@var{start}(@var{row_n}), @var{end}(@var{row_n})}}.
+
+For compatibility with @sc{matlab}, return the second argument (@var{end}) when
+only a single value (@var{n} = 1) is requested.
+@seealso{colon, logspace}
 @end deftypefn */)
 {
   int nargin = args.length ();
@@ -6164,6 +6164,7 @@
 
 This function is equivalent to the operator syntax @w{@code{base : limit}}
 or @w{@code{base : increment : limit}}.
+@seealso{linspace}
 @end deftypefn */)
 {
   int nargin = args.length ();
--- a/libinterp/corefcn/lookup.cc	Wed Jan 03 17:43:07 2018 -0800
+++ b/libinterp/corefcn/lookup.cc	Wed Jan 03 22:00:03 2018 -0800
@@ -218,7 +218,7 @@
 
 @table @code
 @item m
-Match.  @code{table(idx(i)) == val(i)} if @code{val(i)} occurs in table;
+Match.  @code{table(idx(i)) == y(i)} if @code{y(i)} occurs in table;
 otherwise, @code{idx(i)} is zero.
 
 @item b
--- a/libinterp/corefcn/oct-stream.cc	Wed Jan 03 17:43:07 2018 -0800
+++ b/libinterp/corefcn/oct-stream.cc	Wed Jan 03 22:00:03 2018 -0800
@@ -4595,7 +4595,8 @@
                       data = mval.fortran_vec ();                       \
                     }                                                   \
                                                                         \
-                  data[data_index++] = tmp[i++];                        \
+                  data[data_index++] = static_cast<unsigned char>       \
+                                                  (tmp[i++]);           \
                 }                                                       \
             }                                                           \
         }                                                               \
--- a/scripts/elfun/atan2d.m	Wed Jan 03 17:43:07 2018 -0800
+++ b/scripts/elfun/atan2d.m	Wed Jan 03 22:00:03 2018 -0800
@@ -18,7 +18,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {} {} atan2d (@var{y}, @var{x})
-## Compute atan2 (@var{y} / @var{x}) in degrees for corresponding elements
+## Compute atan (@var{y} / @var{x}) in degrees for corresponding elements
 ## from @var{y} and @var{x}.
 ## @seealso{tand, atan2}
 ## @end deftypefn
--- a/scripts/general/logspace.m	Wed Jan 03 17:43:07 2018 -0800
+++ b/scripts/general/logspace.m	Wed Jan 03 22:00:03 2018 -0800
@@ -53,8 +53,15 @@
 ## @end ifnottex
 ## in order to be compatible with the corresponding @sc{matlab} function.
 ##
-## Also for compatibility with @sc{matlab}, return the second argument @var{b}
-## if fewer than two values are requested.
+## Also for compatibility with @sc{matlab}, return the right-hand side of
+## the range
+## @tex
+## ($10^{b}$)
+## @end tex
+## @ifnottex
+## (10^@var{b})
+## @end ifnottex
+## when just a single value is requested.
 ## @seealso{linspace}
 ## @end deftypefn