# HG changeset patch # User jwe # Date 1175614258 0 # Node ID 2ee8293554a343d0014f356d9a1aae1d7eb0472c # Parent 4da9255998e351c7df450a4712291a9debae4370 [project @ 2007-04-03 15:30:58 by jwe] diff -r 4da9255998e3 -r 2ee8293554a3 doc/interpreter/basics.txi --- 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 diff -r 4da9255998e3 -r 2ee8293554a3 liboctave/CMatrix.cc --- 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; diff -r 4da9255998e3 -r 2ee8293554a3 liboctave/CMatrix.h --- 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, diff -r 4da9255998e3 -r 2ee8293554a3 liboctave/ChangeLog --- 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 + + * dMatrix.h (Matrix::inverse): Reinstate versions without + MatrixType argument. + * CMatrix.h (ComplexMatrix::inverse): Likewise. + 2007-03-27 John W. Eaton * Makefile.in (DISTDIRS): Delete variable. diff -r 4da9255998e3 -r 2ee8293554a3 liboctave/dMatrix.cc --- 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; diff -r 4da9255998e3 -r 2ee8293554a3 liboctave/dMatrix.h --- 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,