#include "defun-dld.h"
#include "error.h"
#include "gripes.h"
#include "oct-obj.h"
#include "ops.h"
#include "ov-re-diag.h"
#include "ov-cx-diag.h"
#include "ov-flt-re-diag.h"
#include "ov-flt-cx-diag.h"
#include "ov-perm.h"
#include "utils.h"
Go to the source code of this file.
Functions | |
DEFUN_DLD (inv, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{x} =} inv (@var{A})\n\ @deftypefnx {Loadable Function} {[@var{x}, @var{rcond}] =} inv (@var{A})\n\ Compute the inverse of the square matrix @var{A}. Return an estimate\n\ of the reciprocal condition number if requested, otherwise warn of an\n\ ill-conditioned matrix if the reciprocal condition number is small.\n\ \n\ In general it is best to avoid calculating the inverse of a matrix\n\ directly. For example, it is both faster and more accurate to solve\n\ systems of equations (@var{A}*@math{x} = @math{b}) with\n\ @code{@var{y} = @var{A} \\ @math{b}}, rather than\n\ @code{@var{y} = inv (@var{A}) * @math{b}}.\n\ \n\ If called with a sparse matrix, then in general @var{x} will be a full\n\ matrix requiring significantly more storage. Avoid forming the inverse\n\ of a sparse matrix if possible.\n\ @seealso{ldivide, rdivide}\n\ @end deftypefn") | |
DEFUN_DLD (inverse, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{x} =} inverse (@var{A})\n\ @deftypefnx {Loadable Function} {[@var{x}, @var{rcond}] =} inverse (@var{A})\n\ Compute the inverse of the square matrix @var{A}.\n\ \n\ This is an alias for @code{inv}.\n\ @seealso{inv}\n\ @end deftypefn") |
DEFUN_DLD | ( | inv | , | |
args | , | |||
nargout | ||||
) |
Definition at line 39 of file inv.cc.
References arg(), octave_value::columns(), octave_value::complex_diag_matrix_value(), octave_value::complex_matrix_value(), octave_value::diag_matrix_value(), empty_arg(), error_state, octave_value::float_complex_diag_matrix_value(), octave_value::float_complex_matrix_value(), octave_value::float_diag_matrix_value(), octave_value::float_matrix_value(), gripe_square_matrix_required(), gripe_wrong_type_arg(), ComplexMatrix::inverse(), SparseComplexMatrix::inverse(), Matrix::inverse(), SparseMatrix::inverse(), FloatComplexMatrix::inverse(), FloatMatrix::inverse(), PermMatrix::inverse(), DiagMatrix::inverse(), FloatDiagMatrix::inverse(), ComplexDiagMatrix::inverse(), FloatComplexDiagMatrix::inverse(), octave_value::is_complex_type(), octave_value::is_diag_matrix(), octave_value::is_perm_matrix(), octave_value::is_real_type(), octave_value::is_single_type(), octave_value::is_sparse_type(), octave_value::matrix_value(), octave_value(), octave_value::perm_matrix_value(), print_usage(), DiagMatrix::rcond(), FloatDiagMatrix::rcond(), ComplexDiagMatrix::rcond(), FloatComplexDiagMatrix::rcond(), octave_value::rows(), octave_value::sparse_complex_matrix_value(), octave_value::sparse_matrix_value(), and warning().