Sophie

Sophie

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

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

<html lang="en">
<head>
<title>Explicit and Implicit Conversions - 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="Basic-Usage.html#Basic-Usage" title="Basic Usage">
<link rel="prev" href="Creating-Permutation-Matrices.html#Creating-Permutation-Matrices" title="Creating Permutation Matrices">
<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="Explicit-and-Implicit-Conversions"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Creating-Permutation-Matrices.html#Creating-Permutation-Matrices">Creating Permutation Matrices</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Basic-Usage.html#Basic-Usage">Basic Usage</a>
<hr>
</div>

<h4 class="subsection">21.1.3 Explicit and Implicit Conversions</h4>

<p>The diagonal and permutation matrices are special objects in their own right.  A
number of operations and built-in functions are defined for these matrices to
use special, more efficient code than would be used for a full matrix in the
same place.  Examples are given in further sections.

   <p>To facilitate smooth mixing with full matrices, backward compatibility, and
compatibility with <span class="sc">matlab</span>, the diagonal and permutation matrices should
allow any operation that works on full matrices, and will either treat it
specially, or implicitly convert themselves to full matrices.

   <p>Instances include matrix indexing, except for extracting a single element or
a leading submatrix, indexed assignment, or applying most mapper functions,
such as <dfn>exp</dfn>.

   <p>An explicit conversion to a full matrix can be requested using the built-in
function <dfn>full</dfn>.  It should also be noted that the diagonal and permutation
matrix objects will cache the result of the conversion after it is first
requested (explicitly or implicitly), so that subsequent conversions will
be very cheap.

   </body></html>