# HG changeset patch # User Rik # Date 1515045603 28800 # Node ID 9c178e5252e430e4313e9e45c2f3825a19cf6f31 # Parent b480fe1089bb288fed84330ac1a26efa196338fa# Parent 5188d936c79abbdd476378f17616305df085aa5e maint: merge stable to default. diff -r b480fe1089bb -r 9c178e5252e4 libinterp/corefcn/data.cc --- 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 (); diff -r b480fe1089bb -r 9c178e5252e4 libinterp/corefcn/lookup.cc --- 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 diff -r b480fe1089bb -r 9c178e5252e4 libinterp/corefcn/oct-stream.cc --- 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 \ + (tmp[i++]); \ } \ } \ } \ diff -r b480fe1089bb -r 9c178e5252e4 scripts/elfun/atan2d.m --- 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 diff -r b480fe1089bb -r 9c178e5252e4 scripts/general/logspace.m --- 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