# HG changeset patch # User Rik # Date 1509744279 25200 # Node ID 11cdca79d3163257e13db9055c8d950931e26577 # Parent 2b769c2421884d67ebc39fc8bc4a738e5b34624b# Parent 63fc7a75a3d71c94680df4037ad5394e46660862 maint: Periodic merge of stable to default. diff -r 2b769c242188 -r 11cdca79d316 libinterp/corefcn/inv.cc --- a/libinterp/corefcn/inv.cc Fri Nov 03 13:53:45 2017 -0700 +++ b/libinterp/corefcn/inv.cc Fri Nov 03 14:24:39 2017 -0700 @@ -54,7 +54,7 @@ If called with a sparse matrix, then in general @var{x} will be a full matrix requiring significantly more storage. Avoid forming the inverse of a sparse matrix if possible. -@seealso{ldivide, rdivide} +@seealso{ldivide, rdivide, pinv} @end deftypefn */) { if (args.length () != 1) diff -r 2b769c242188 -r 11cdca79d316 libinterp/corefcn/pinv.cc --- a/libinterp/corefcn/pinv.cc Fri Nov 03 13:53:45 2017 -0700 +++ b/libinterp/corefcn/pinv.cc Fri Nov 03 14:24:39 2017 -0700 @@ -39,18 +39,17 @@ doc: /* -*- texinfo -*- @deftypefn {} {} pinv (@var{x}) @deftypefnx {} {} pinv (@var{x}, @var{tol}) -Return the pseudoinverse of @var{x}. +Return the Moore-Penrose pseudoinverse of @var{x}. Singular values less than @var{tol} are ignored. If the second argument is omitted, it is taken to be @example -tol = max (size (@var{x})) * sigma_max (@var{x}) * eps, +tol = max ([rows(@var{x}), columns(@var{x})]) * norm (@var{x}) * eps @end example -@noindent -where @code{sigma_max (@var{x})} is the maximal singular value of @var{x}. +@seealso(inv, ldivide) @end deftypefn */) { int nargin = args.length ();