Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > b38d2da330d1936e5ab1307c039c4941 > files > 119

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

<html lang="en">
<head>
<title>Basic Usage - 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="Diagonal-and-Permutation-Matrices.html#Diagonal-and-Permutation-Matrices" title="Diagonal and Permutation Matrices">
<link rel="next" href="Matrix-Algebra.html#Matrix-Algebra" title="Matrix Algebra">
<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-Usage"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Matrix-Algebra.html#Matrix-Algebra">Matrix Algebra</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Diagonal-and-Permutation-Matrices.html#Diagonal-and-Permutation-Matrices">Diagonal and Permutation Matrices</a>
<hr>
</div>

<h3 class="section">21.1 Creating and Manipulating Diagonal and Permutation Matrices</h3>

<p>A diagonal matrix is defined as a matrix that has zero entries outside the main
diagonal; that is,
<code>D(i,j) == 0</code> if <code>i != j</code>. 
Most often, square diagonal matrices are considered; however, the definition can
equally be applied to non-square matrices, in which case we usually speak of a
rectangular diagonal matrix.

   <p>A permutation matrix is defined as a square matrix that has a single element
equal to unity in each row and each column; all other elements are zero.  That
is, there exists a permutation (vector)
<code>p</code> such that <code>P(i,j) == 1</code> if <code>j == p(i)</code> and
<code>P(i,j) == 0</code> otherwise.

   <p>Octave provides special treatment of real and complex rectangular diagonal
matrices, as well as permutation matrices.  They are stored as special objects,
using efficient storage and algorithms, facilitating writing both readable and
efficient matrix algebra expressions in the Octave language.

<ul class="menu">
<li><a accesskey="1" href="Creating-Diagonal-Matrices.html#Creating-Diagonal-Matrices">Creating Diagonal Matrices</a>
<li><a accesskey="2" href="Creating-Permutation-Matrices.html#Creating-Permutation-Matrices">Creating Permutation Matrices</a>
<li><a accesskey="3" href="Explicit-and-Implicit-Conversions.html#Explicit-and-Implicit-Conversions">Explicit and Implicit Conversions</a>
</ul>

   </body></html>