changeset 6479:2ee8293554a3

[project @ 2007-04-03 15:30:58 by jwe]
author jwe
date Tue, 03 Apr 2007 15:30:58 +0000
parents 4da9255998e3
children 23ed94dfbfa8
files doc/interpreter/basics.txi liboctave/CMatrix.cc liboctave/CMatrix.h liboctave/ChangeLog liboctave/dMatrix.cc liboctave/dMatrix.h
diffstat 6 files changed, 55 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/basics.txi	Thu Mar 29 16:31:16 2007 +0000
+++ b/doc/interpreter/basics.txi	Tue Apr 03 15:30:58 2007 +0000
@@ -202,13 +202,14 @@
 
 @DOCSTRING(program_invocation_name)
 
-Here is an example of using these variables to reproduce Octave's
+Here is an example of using these functions to reproduce Octave's
 command line.
 
 @example
-printf ("%s", program_name);
+printf ("%s", program_name ());
 for i = 1:nargin
-  printf (" %s", nth (argv, i));
+  arg_list = argv ();
+  printf (" %s", arg_list@{i@});
 endfor
 printf ("\n");
 @end example
@@ -811,17 +812,18 @@
 program which users can invoke without knowing that the program is
 written in the Octave language.
 
-If you invoke an executable Octave script with command line arguments,
-the arguments are available in the built-in variable @code{argv}.
+The built-in function @code{argv} returns a cell array containing the
+command line arguments passed to an executable Octave script
 @xref{Command Line Options}.  For example, the following program will
 reproduce the command line that is used to execute it.
 
 @example
 @group
 #! /bin/octave -qf
-printf ("%s", program_name);
+printf ("%s", program_name ());
 for i = 1:nargin
-  printf (" %s", argv@{i@});
+  arg_list = argv ();
+  printf (" %s", arg_list@{i@});
 endfor
 printf ("\n");
 @end group
--- a/liboctave/CMatrix.cc	Thu Mar 29 16:31:16 2007 +0000
+++ b/liboctave/CMatrix.cc	Tue Apr 03 15:30:58 2007 +0000
@@ -973,6 +973,22 @@
 }
 
 ComplexMatrix
+ComplexMatrix::inverse (octave_idx_type& info) const
+{
+  double rcond;
+  MatrixType mattype (*this);
+  return inverse (mattype, info, rcond, 0, 0);
+}
+
+ComplexMatrix
+ComplexMatrix::inverse (octave_idx_type& info, double& rcond, int force,
+			int calc_cond) const
+{
+  MatrixType mattype (*this);
+  return inverse (mattype, info, rcond, 0, 0);
+}
+
+ComplexMatrix
 ComplexMatrix::inverse (MatrixType &mattype) const
 {
   octave_idx_type info;
--- a/liboctave/CMatrix.h	Thu Mar 29 16:31:16 2007 +0000
+++ b/liboctave/CMatrix.h	Tue Apr 03 15:30:58 2007 +0000
@@ -144,6 +144,10 @@
 
 public:
   ComplexMatrix inverse (void) const;
+  ComplexMatrix inverse (octave_idx_type& info) const;
+  ComplexMatrix inverse (octave_idx_type& info, double& rcond, int force = 0, 
+			 int calc_cond = 1) const;
+
   ComplexMatrix inverse (MatrixType &mattype) const;
   ComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info) const;
   ComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info,
--- a/liboctave/ChangeLog	Thu Mar 29 16:31:16 2007 +0000
+++ b/liboctave/ChangeLog	Tue Apr 03 15:30:58 2007 +0000
@@ -1,3 +1,9 @@
+2007-04-02  John W. Eaton  <jwe@octave.org>
+
+	* dMatrix.h (Matrix::inverse): Reinstate versions without
+	MatrixType argument.
+	* CMatrix.h (ComplexMatrix::inverse): Likewise.
+
 2007-03-27  John W. Eaton  <jwe@octave.org>
 
 	* Makefile.in (DISTDIRS): Delete variable.
--- a/liboctave/dMatrix.cc	Thu Mar 29 16:31:16 2007 +0000
+++ b/liboctave/dMatrix.cc	Tue Apr 03 15:30:58 2007 +0000
@@ -641,6 +641,22 @@
 }
 
 Matrix
+Matrix::inverse (octave_idx_type& info) const
+{
+  double rcond;
+  MatrixType mattype (*this);
+  return inverse (mattype, info, rcond, 0, 0);
+}
+
+Matrix
+Matrix::inverse (octave_idx_type& info, double& rcond, int force,
+		 int calc_cond) const
+{
+  MatrixType mattype (*this);
+  return inverse (mattype, info, rcond, force, calc_cond);
+}
+
+Matrix
 Matrix::inverse (MatrixType& mattype) const
 {
   octave_idx_type info;
--- a/liboctave/dMatrix.h	Thu Mar 29 16:31:16 2007 +0000
+++ b/liboctave/dMatrix.h	Tue Apr 03 15:30:58 2007 +0000
@@ -116,6 +116,10 @@
 
 public:
   Matrix inverse (void) const;
+  Matrix inverse (octave_idx_type& info) const;
+  Matrix inverse (octave_idx_type& info, double& rcond, int force = 0,
+		  int calc_cond = 1) const;
+
   Matrix inverse (MatrixType &mattype) const;
   Matrix inverse (MatrixType &mattype, octave_idx_type& info) const;
   Matrix inverse (MatrixType &mattype, octave_idx_type& info, double& rcond,