Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > b38d2da330d1936e5ab1307c039c4941 > files > 115

octave-doc-3.6.4-3.mga4.noarch.rpm

<html lang="en">
<head>
<title>Basic Matrix Functions - GNU Octave</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Octave">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Linear-Algebra.html#Linear-Algebra" title="Linear Algebra">
<link rel="prev" href="Techniques-Used-for-Linear-Algebra.html#Techniques-Used-for-Linear-Algebra" title="Techniques Used for Linear Algebra">
<link rel="next" href="Matrix-Factorizations.html#Matrix-Factorizations" title="Matrix Factorizations">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Basic-Matrix-Functions"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Matrix-Factorizations.html#Matrix-Factorizations">Matrix Factorizations</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Techniques-Used-for-Linear-Algebra.html#Techniques-Used-for-Linear-Algebra">Techniques Used for Linear Algebra</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Linear-Algebra.html#Linear-Algebra">Linear Algebra</a>
<hr>
</div>

<h3 class="section">18.2 Basic Matrix Functions</h3>

<!-- balance src/DLD-FUNCTIONS/balance.cc -->
<p><a name="doc_002dbalance"></a>

<div class="defun">
&mdash; Loadable Function: <var>AA</var> = <b>balance</b> (<var>A</var>)<var><a name="index-balance-2001"></a></var><br>
&mdash; Loadable Function: <var>AA</var> = <b>balance</b> (<var>A, opt</var>)<var><a name="index-balance-2002"></a></var><br>
&mdash; Loadable Function: [<var>DD</var>, <var>AA</var>] = <b>balance</b> (<var>A, opt</var>)<var><a name="index-balance-2003"></a></var><br>
&mdash; Loadable Function: [<var>D</var>, <var>P</var>, <var>AA</var>] = <b>balance</b> (<var>A, opt</var>)<var><a name="index-balance-2004"></a></var><br>
&mdash; Loadable Function: [<var>CC</var>, <var>DD</var>, <var>AA</var>, <var>BB</var>] = <b>balance</b> (<var>A, B, opt</var>)<var><a name="index-balance-2005"></a></var><br>
<blockquote>
        <p>Compute <var>AA</var><code> = </code><var>DD</var><code> \ </code><var>A</var><code> * </code><var>DD</var> in which <var>AA</var>
is a matrix whose row and column norms are roughly equal in magnitude, and
<var>DD</var><code> = </code><var>P</var><code> * </code><var>D</var>, in which <var>P</var> is a permutation
matrix and <var>D</var> is a diagonal matrix of powers of two.  This allows the
equilibration to be computed without round-off.  Results of eigenvalue
calculation are typically improved by balancing first.

        <p>If two output values are requested, <code>balance</code> returns
the diagonal <var>D</var> and the permutation <var>P</var> separately as vectors. 
In this case, <var>DD</var><code> = eye(n)(:,</code><var>P</var><code>) * diag (</code><var>D</var><code>)</code>, where
n is the matrix size.

        <p>If four output values are requested, compute <var>AA</var><code> =
</code><var>CC</var><code>*</code><var>A</var><code>*</code><var>DD</var> and <var>BB</var><code> = </code><var>CC</var><code>*</code><var>B</var><code>*</code><var>DD</var>,
in which <var>AA</var> and <var>BB</var> have non-zero elements of approximately the
same magnitude and <var>CC</var> and <var>DD</var> are permuted diagonal matrices as
in <var>DD</var> for the algebraic eigenvalue problem.

        <p>The eigenvalue balancing option <var>opt</var> may be one of:

          <dl>
<dt>"noperm", "S"<dd>Scale only; do not permute.

          <br><dt>"noscal", "P"<dd>Permute only; do not scale. 
</dl>

        <p>Algebraic eigenvalue balancing uses standard <span class="sc">lapack</span> routines.

        <p>Generalized eigenvalue problem balancing uses Ward's algorithm
(SIAM Journal on Scientific and Statistical Computing, 1981). 
</p></blockquote></div>

<!-- cond scripts/linear-algebra/cond.m -->
   <p><a name="doc_002dcond"></a>

<div class="defun">
&mdash; Function File:  <b>cond</b> (<var>A</var>)<var><a name="index-cond-2006"></a></var><br>
&mdash; Function File:  <b>cond</b> (<var>A, p</var>)<var><a name="index-cond-2007"></a></var><br>
<blockquote><p>Compute the <var>p</var>-norm condition number of a matrix.

        <p><code>cond (</code><var>A</var><code>)</code> is ## defined as
<code>norm (</code><var>A</var><code>, </code><var>p</var><code>) * norm (inv (</code><var>A</var><code>), </code><var>p</var><code>)</code>.

        <p>By default <var>p</var><code> = 2</code> is used which implies a (relatively slow)
singular value decomposition.  Other possible selections are
<var>p</var><code> = 1, Inf, "fro"</code> which are generally faster.  See
<code>norm</code> for a full discussion of possible <var>p</var> values. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dcondest.html#doc_002dcondest">condest</a>, <a href="doc_002drcond.html#doc_002drcond">rcond</a>, <a href="doc_002dnorm.html#doc_002dnorm">norm</a>, <a href="doc_002dsvd.html#doc_002dsvd">svd</a>. 
</p></blockquote></div>

<!-- det src/DLD-FUNCTIONS/det.cc -->
   <p><a name="doc_002ddet"></a>

<div class="defun">
&mdash; Loadable Function:  <b>det</b> (<var>A</var>)<var><a name="index-det-2008"></a></var><br>
&mdash; Loadable Function: [<var>d</var>, <var>rcond</var>] = <b>det</b> (<var>A</var>)<var><a name="index-det-2009"></a></var><br>
<blockquote><p>Compute the determinant of <var>A</var>.

        <p>Return an estimate of the reciprocal condition number if requested.

        <p>Routines from <span class="sc">lapack</span> are used for full matrices and code from
<span class="sc">umfpack</span> is used for sparse matrices.

        <p>The determinant should not be used to check a matrix for singularity. 
For that, use any of the condition number functions: <code>cond</code>,
<code>condest</code>, <code>rcond</code>. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dcond.html#doc_002dcond">cond</a>, <a href="doc_002dcondest.html#doc_002dcondest">condest</a>, <a href="doc_002drcond.html#doc_002drcond">rcond</a>. 
</p></blockquote></div>

<!-- eig src/DLD-FUNCTIONS/eig.cc -->
   <p><a name="doc_002deig"></a>

<div class="defun">
&mdash; Loadable Function: <var>lambda</var> = <b>eig</b> (<var>A</var>)<var><a name="index-eig-2010"></a></var><br>
&mdash; Loadable Function: <var>lambda</var> = <b>eig</b> (<var>A, B</var>)<var><a name="index-eig-2011"></a></var><br>
&mdash; Loadable Function: [<var>V</var>, <var>lambda</var>] = <b>eig</b> (<var>A</var>)<var><a name="index-eig-2012"></a></var><br>
&mdash; Loadable Function: [<var>V</var>, <var>lambda</var>] = <b>eig</b> (<var>A, B</var>)<var><a name="index-eig-2013"></a></var><br>
<blockquote><p>Compute the eigenvalues and eigenvectors of a matrix.

        <p>Eigenvalues are computed in a several step process which begins with a
Hessenberg decomposition, followed by a Schur&nbsp;decomposition, from which
the eigenvalues are apparent.  The eigenvectors, when desired, are computed
by further manipulations of the Schur&nbsp;decomposition.

        <p>The eigenvalues returned by <code>eig</code> are not ordered. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002deigs.html#doc_002deigs">eigs</a>, <a href="doc_002dsvd.html#doc_002dsvd">svd</a>. 
</p></blockquote></div>

<!-- givens src/DLD-FUNCTIONS/givens.cc -->
   <p><a name="doc_002dgivens"></a>

<div class="defun">
&mdash; Loadable Function: <var>g</var> = <b>givens</b> (<var>x, y</var>)<var><a name="index-givens-2014"></a></var><br>
&mdash; Loadable Function: [<var>c</var>, <var>s</var>] = <b>givens</b> (<var>x, y</var>)<var><a name="index-givens-2015"></a></var><br>
<blockquote><p>Return a 2 by 2 orthogonal matrix
<var>g</var><code> = [</code><var>c</var> <var>s</var><code>; -</code><var>s</var><code>' </code><var>c</var><code>]</code> such that
<var>g</var><code> [</code><var>x</var><code>; </code><var>y</var><code>] = [*; 0]</code> with <var>x</var> and <var>y</var> scalars.

        <p>For example:

     <pre class="example">          givens (1, 1)
               &rArr;   0.70711   0.70711
                   -0.70711   0.70711
</pre>
        </blockquote></div>

<!-- planerot scripts/linear-algebra/planerot.m -->
   <p><a name="doc_002dplanerot"></a>

<div class="defun">
&mdash; Function File: [<var>g</var>, <var>y</var>] = <b>planerot</b> (<var>x</var>)<var><a name="index-planerot-2016"></a></var><br>
<blockquote><p>Given a two-element column vector, returns the
2 by 2 orthogonal matrix
<var>G</var> such that
<var>y</var><code> = </code><var>g</var><code> * </code><var>x</var> and <var>y</var><code>(2) = 0</code>. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dgivens.html#doc_002dgivens">givens</a>. 
</p></blockquote></div>

<!-- inv src/DLD-FUNCTIONS/inv.cc -->
   <p><a name="doc_002dinv"></a>

<div class="defun">
&mdash; Loadable Function: <var>x</var> = <b>inv</b> (<var>A</var>)<var><a name="index-inv-2017"></a></var><br>
&mdash; Loadable Function: [<var>x</var>, <var>rcond</var>] = <b>inv</b> (<var>A</var>)<var><a name="index-inv-2018"></a></var><br>
<blockquote><p>Compute the inverse of the square matrix <var>A</var>.  Return an estimate
of the reciprocal condition number if requested, otherwise warn of an
ill-conditioned matrix if the reciprocal condition number is small.

        <p>In general it is best to avoid calculating the inverse of a matrix
directly.  For example, it is both faster and more accurate to solve
systems of equations (<var>A</var>*x = b) with
<var>y</var><code> = </code><var>A</var><code> \ b</code>, rather than
<var>y</var><code> = inv (</code><var>A</var><code>) * b</code>.

        <p>If called with a sparse matrix, then in general <var>x</var> will be a full
matrix requiring significantly more storage.  Avoid forming the inverse
of a sparse matrix if possible. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dldivide.html#doc_002dldivide">ldivide</a>, <a href="doc_002drdivide.html#doc_002drdivide">rdivide</a>. 
</p></blockquote></div>

<!-- matrix_type src/DLD-FUNCTIONS/matrix_type.cc -->
   <p><a name="doc_002dmatrix_005ftype"></a>

<div class="defun">
&mdash; Loadable Function: <var>type</var> = <b>matrix_type</b> (<var>A</var>)<var><a name="index-matrix_005ftype-2019"></a></var><br>
&mdash; Loadable Function: <var>type</var> = <b>matrix_type</b> (<var>A, 'nocompute'</var>)<var><a name="index-matrix_005ftype-2020"></a></var><br>
&mdash; Loadable Function: <var>A</var> = <b>matrix_type</b> (<var>A, type</var>)<var><a name="index-matrix_005ftype-2021"></a></var><br>
&mdash; Loadable Function: <var>A</var> = <b>matrix_type</b> (<var>A, 'upper', perm</var>)<var><a name="index-matrix_005ftype-2022"></a></var><br>
&mdash; Loadable Function: <var>A</var> = <b>matrix_type</b> (<var>A, 'lower', perm</var>)<var><a name="index-matrix_005ftype-2023"></a></var><br>
&mdash; Loadable Function: <var>A</var> = <b>matrix_type</b> (<var>A, 'banded', nl, nu</var>)<var><a name="index-matrix_005ftype-2024"></a></var><br>
<blockquote><p>Identify the matrix type or mark a matrix as a particular type.  This allows
more rapid solutions of linear equations involving <var>A</var> to be performed. 
Called with a single argument, <code>matrix_type</code> returns the type of the
matrix and caches it for future use.  Called with more than one argument,
<code>matrix_type</code> allows the type of the matrix to be defined.

        <p>If the option 'nocompute' is given, the function will not attempt to guess
the type if it is still unknown.  This is useful for debugging purposes.

        <p>The possible matrix types depend on whether the matrix is full or sparse, and
can be one of the following

          <dl>
<dt>'unknown'<dd>Remove any previously cached matrix type, and mark type as unknown.

          <br><dt>'full'<dd>Mark the matrix as full.

          <br><dt>'positive definite'<dd>Probable full positive definite matrix.

          <br><dt>'diagonal'<dd>Diagonal matrix.  (Sparse matrices only)

          <br><dt>'permuted diagonal'<dd>Permuted Diagonal matrix.  The permutation does not need to be specifically
indicated, as the structure of the matrix explicitly gives this.  (Sparse
matrices only)

          <br><dt>'upper'<dd>Upper triangular.  If the optional third argument <var>perm</var> is given, the
matrix is assumed to be a permuted upper triangular with the permutations
defined by the vector <var>perm</var>.

          <br><dt>'lower'<dd>Lower triangular.  If the optional third argument <var>perm</var> is given, the
matrix is assumed to be a permuted lower triangular with the permutations
defined by the vector <var>perm</var>.

          <br><dt>'banded'<dt>'banded positive definite'<dd>Banded matrix with the band size of <var>nl</var> below the diagonal and <var>nu</var>
above it.  If <var>nl</var> and <var>nu</var> are 1, then the matrix is tridiagonal and
treated with specialized code.  In addition the matrix can be marked as
probably a positive definite.  (Sparse matrices only)

          <br><dt>'singular'<dd>The matrix is assumed to be singular and will be treated with a minimum norm
solution.

        </dl>

        <p>Note that the matrix type will be discovered automatically on the first
attempt to solve a linear equation involving <var>A</var>.  Therefore
<code>matrix_type</code> is only useful to give Octave hints of the matrix type. 
Incorrectly defining the matrix type will result in incorrect results from
solutions of linear equations; it is entirely <strong>the responsibility of
the user</strong> to correctly identify the matrix type.

        <p>Also, the test for positive definiteness is a low-cost test for a Hermitian
matrix with a real positive diagonal.  This does not guarantee that the
matrix is positive definite, but only that it is a probable candidate.  When
such a matrix is factorized, a Cholesky&nbsp;factorization is first
attempted, and if that fails the matrix is then treated with an
LU&nbsp;factorization.  Once the matrix has been factorized,
<code>matrix_type</code> will return the correct classification of the matrix. 
</p></blockquote></div>

<!-- norm src/data.cc -->
   <p><a name="doc_002dnorm"></a>

<div class="defun">
&mdash; Built-in Function:  <b>norm</b> (<var>A</var>)<var><a name="index-norm-2025"></a></var><br>
&mdash; Built-in Function:  <b>norm</b> (<var>A, p</var>)<var><a name="index-norm-2026"></a></var><br>
&mdash; Built-in Function:  <b>norm</b> (<var>A, p, opt</var>)<var><a name="index-norm-2027"></a></var><br>
<blockquote><p>Compute the p-norm of the matrix <var>A</var>.  If the second argument is
missing, <code>p = 2</code> is assumed.

        <p>If <var>A</var> is a matrix (or sparse matrix):

          <dl>
<dt><var>p</var> = <code>1</code><dd>1-norm, the largest column sum of the absolute values of <var>A</var>.

          <br><dt><var>p</var> = <code>2</code><dd>Largest singular value of <var>A</var>.

          <br><dt><var>p</var> = <code>Inf</code> or <code>"inf"</code><dd><a name="index-infinity-norm-2028"></a>Infinity norm, the largest row sum of the absolute values of <var>A</var>.

          <br><dt><var>p</var> = <code>"fro"</code><dd><a name="index-Frobenius-norm-2029"></a>Frobenius norm of <var>A</var>, <code>sqrt (sum (diag (</code><var>A</var><code>' * </code><var>A</var><code>)))</code>.

          <br><dt>other <var>p</var>, <var>p</var><code> &gt; 1</code><dd><a name="index-general-p_002dnorm-2030"></a>maximum <code>norm (A*x, p)</code> such that <code>norm (x, p) == 1</code>
</dl>

        <p>If <var>A</var> is a vector or a scalar:

          <dl>
<dt><var>p</var> = <code>Inf</code> or <code>"inf"</code><dd><code>max (abs (</code><var>A</var><code>))</code>.

          <br><dt><var>p</var> = <code>-Inf</code><dd><code>min (abs (</code><var>A</var><code>))</code>.

          <br><dt><var>p</var> = <code>"fro"</code><dd>Frobenius norm of <var>A</var>, <code>sqrt (sumsq (abs (A)))</code>.

          <br><dt><var>p</var> = 0<dd>Hamming norm - the number of nonzero elements.

          <br><dt>other <var>p</var>, <var>p</var><code> &gt; 1</code><dd>p-norm of <var>A</var>, <code>(sum (abs (</code><var>A</var><code>) .^ </code><var>p</var><code>)) ^ (1/</code><var>p</var><code>)</code>.

          <br><dt>other <var>p</var> <var>p</var><code> &lt; 1</code><dd>the p-pseudonorm defined as above. 
</dl>

        <p>If <var>opt</var> is the value <code>"rows"</code>, treat each row as a vector and
compute its norm.  The result is returned as a column vector. 
Similarly, if <var>opt</var> is <code>"columns"</code> or <code>"cols"</code> then compute
the norms of each column and return a row vector. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dcond.html#doc_002dcond">cond</a>, <a href="doc_002dsvd.html#doc_002dsvd">svd</a>. 
</p></blockquote></div>

<!-- null scripts/linear-algebra/null.m -->
   <p><a name="doc_002dnull"></a>

<div class="defun">
&mdash; Function File:  <b>null</b> (<var>A</var>)<var><a name="index-null-2031"></a></var><br>
&mdash; Function File:  <b>null</b> (<var>A, tol</var>)<var><a name="index-null-2032"></a></var><br>
<blockquote><p>Return an orthonormal basis of the null space of <var>A</var>.

        <p>The dimension of the null space is taken as the number of singular
values of <var>A</var> not greater than <var>tol</var>.  If the argument <var>tol</var>
is missing, it is computed as

     <pre class="example">          max (size (<var>A</var>)) * max (svd (<var>A</var>)) * eps
</pre>
        <!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
     <!-- A simple blank line produces the correct behavior. -->
     <!-- @sp 1 -->
     <p class="noindent"><strong>See also:</strong> <a href="doc_002dorth.html#doc_002dorth">orth</a>. 
</p></blockquote></div>

<!-- orth scripts/linear-algebra/orth.m -->
   <p><a name="doc_002dorth"></a>

<div class="defun">
&mdash; Function File:  <b>orth</b> (<var>A</var>)<var><a name="index-orth-2033"></a></var><br>
&mdash; Function File:  <b>orth</b> (<var>A, tol</var>)<var><a name="index-orth-2034"></a></var><br>
<blockquote><p>Return an orthonormal basis of the range space of <var>A</var>.

        <p>The dimension of the range space is taken as the number of singular
values of <var>A</var> greater than <var>tol</var>.  If the argument <var>tol</var> is
missing, it is computed as

     <pre class="example">          max (size (<var>A</var>)) * max (svd (<var>A</var>)) * eps
</pre>
        <!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
     <!-- A simple blank line produces the correct behavior. -->
     <!-- @sp 1 -->
     <p class="noindent"><strong>See also:</strong> <a href="doc_002dnull.html#doc_002dnull">null</a>. 
</p></blockquote></div>

<!-- mgorth src/DLD-FUNCTIONS/mgorth.cc -->
   <p><a name="doc_002dmgorth"></a>

<div class="defun">
&mdash; Loadable Function: [<var>y</var>, <var>h</var>] = <b>mgorth</b> (<var>x, v</var>)<var><a name="index-mgorth-2035"></a></var><br>
<blockquote><p>Orthogonalize a given column vector <var>x</var> with respect to a given
orthonormal basis <var>v</var> using a modified Gram-Schmidt orthogonalization. 
On exit, <var>y</var> is a unit vector such that:

     <pre class="example">            norm (<var>y</var>) = 1
            <var>v</var>' * <var>y</var> = 0
            <var>x</var> = <var>h</var>*[<var>v</var>, <var>y</var>]
</pre>
        </blockquote></div>

<!-- pinv src/DLD-FUNCTIONS/pinv.cc -->
   <p><a name="doc_002dpinv"></a>

<div class="defun">
&mdash; Loadable Function:  <b>pinv</b> (<var>x</var>)<var><a name="index-pinv-2036"></a></var><br>
&mdash; Loadable Function:  <b>pinv</b> (<var>x, tol</var>)<var><a name="index-pinv-2037"></a></var><br>
<blockquote><p>Return the pseudoinverse of <var>x</var>.  Singular values less than
<var>tol</var> are ignored.

        <p>If the second argument is omitted, it is taken to be

     <pre class="example">          tol = max (size (<var>x</var>)) * sigma_max (<var>x</var>) * eps,
</pre>
        <p class="noindent">where <code>sigma_max (</code><var>x</var><code>)</code> is the maximal singular value of <var>x</var>. 
</p></blockquote></div>

<!-- rank scripts/linear-algebra/rank.m -->
   <p><a name="doc_002drank"></a>

<div class="defun">
&mdash; Function File:  <b>rank</b> (<var>A</var>)<var><a name="index-rank-2038"></a></var><br>
&mdash; Function File:  <b>rank</b> (<var>A, tol</var>)<var><a name="index-rank-2039"></a></var><br>
<blockquote><p>Compute the rank of <var>A</var>, using the singular value decomposition. 
The rank is taken to be the number of singular values of <var>A</var> that
are greater than the specified tolerance <var>tol</var>.  If the second
argument is omitted, it is taken to be

     <pre class="example">          tol = max (size (<var>A</var>)) * sigma(1) * eps;
</pre>
        <p class="noindent">where <code>eps</code> is machine precision and <code>sigma(1)</code> is the largest
singular value of <var>A</var>. 
</p></blockquote></div>

<!-- rcond src/DLD-FUNCTIONS/rcond.cc -->
   <p><a name="doc_002drcond"></a>

<div class="defun">
&mdash; Loadable Function: <var>c</var> = <b>rcond</b> (<var>A</var>)<var><a name="index-rcond-2040"></a></var><br>
<blockquote><p>Compute the 1-norm estimate of the reciprocal condition number as returned
by <span class="sc">lapack</span>.  If the matrix is well-conditioned then <var>c</var> will be near
1 and if the matrix is poorly conditioned it will be close to zero.

        <p>The matrix <var>A</var> must not be sparse.  If the matrix is sparse then
<code>condest (</code><var>A</var><code>)</code> or <code>rcond (full (</code><var>A</var><code>))</code> should be used
instead. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dcond.html#doc_002dcond">cond</a>, <a href="doc_002dcondest.html#doc_002dcondest">condest</a>. 
</p></blockquote></div>

<!-- trace scripts/linear-algebra/trace.m -->
   <p><a name="doc_002dtrace"></a>

<div class="defun">
&mdash; Function File:  <b>trace</b> (<var>A</var>)<var><a name="index-trace-2041"></a></var><br>
<blockquote><p>Compute the trace of <var>A</var>, <code>sum (diag (</code><var>A</var><code>))</code>. 
</p></blockquote></div>

<!-- rref scripts/linear-algebra/rref.m -->
   <p><a name="doc_002drref"></a>

<div class="defun">
&mdash; Function File:  <b>rref</b> (<var>A</var>)<var><a name="index-rref-2042"></a></var><br>
&mdash; Function File:  <b>rref</b> (<var>A, tol</var>)<var><a name="index-rref-2043"></a></var><br>
&mdash; Function File: [<var>r</var>, <var>k</var>] = <b>rref</b> (<var><small class="dots">...</small></var>)<var><a name="index-rref-2044"></a></var><br>
<blockquote><p>Return the reduced row echelon form of <var>A</var>.  <var>tol</var> defaults
to <code>eps * max (size (</code><var>A</var><code>)) * norm (</code><var>A</var><code>, inf)</code>.

        <p>Called with two return arguments, <var>k</var> returns the vector of
"bound variables", which are those columns on which elimination
has been performed.

        </blockquote></div>

   </body></html>