changeset 27257:7f5008aec7a1 stable

doc: Add function index entry for alias "inverse" bug #56629). * inv.cc (Finv): Add @deftypefnx entry for "inverse". Add note to documentation explaining that "inverse" is alias for "inv" * expr.txi, invhilb.m: Use "inv" rather than "inverse" in @code examples.
author Rik <rik@octave.org>
date Mon, 15 Jul 2019 13:57:14 -0700
parents 5d3665e6677c
children 85efcc8f2f89 da1d653570a3
files doc/interpreter/expr.txi libinterp/corefcn/inv.cc scripts/special-matrix/invhilb.m
diffstat 3 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/expr.txi	Sat Jul 13 13:06:16 2019 -0700
+++ b/doc/interpreter/expr.txi	Mon Jul 15 13:57:14 2019 -0700
@@ -714,7 +714,7 @@
 Right division.  This is conceptually equivalent to the expression
 
 @example
-(inverse (y') * x')'
+(inv (y') * x')'
 @end example
 
 @noindent
@@ -732,7 +732,7 @@
 Left division.  This is conceptually equivalent to the expression
 
 @example
-inverse (x) * y
+inv (x) * y
 @end example
 
 @noindent
--- a/libinterp/corefcn/inv.cc	Sat Jul 13 13:06:16 2019 -0700
+++ b/libinterp/corefcn/inv.cc	Mon Jul 15 13:57:14 2019 -0700
@@ -39,6 +39,7 @@
        doc: /* -*- texinfo -*-
 @deftypefn  {} {@var{x} =} inv (@var{A})
 @deftypefnx {} {[@var{x}, @var{rcond}] =} inv (@var{A})
+@deftypefnx {} {[@dots{}] =} inverse (@dots{})
 Compute the inverse of the square matrix @var{A}.
 
 Return an estimate of the reciprocal condition number if requested,
@@ -54,6 +55,8 @@
 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.
+
+@code{inverse} is an alias and may be used identically in place of @code{inv}.
 @seealso{ldivide, rdivide, pinv}
 @end deftypefn */)
 {
--- a/scripts/special-matrix/invhilb.m	Sat Jul 13 13:06:16 2019 -0700
+++ b/scripts/special-matrix/invhilb.m	Mon Jul 15 13:57:14 2019 -0700
@@ -66,7 +66,7 @@
 ## directly via the theory of Cauchy matrices.  See @nospell{J. W. Demmel},
 ## @cite{Applied Numerical Linear Algebra}, p. 92.
 ##
-## Compare this with the numerical calculation of @code{inverse (hilb (n))},
+## Compare this with the numerical calculation of @code{inv (hilb (n))},
 ## which suffers from the ill-conditioning of the Hilbert matrix, and the
 ## finite precision of your computer's floating point arithmetic.
 ## @seealso{hilb}