1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
<html lang="en">
<head>
<title>Empty Matrices - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Matrices.html#Matrices" title="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">
<p>
<a name="Empty-Matrices"></a>
Up: <a rel="up" accesskey="u" href="Matrices.html#Matrices">Matrices</a>
<hr>
</div>
<h4 class="subsection">4.1.1 Empty Matrices</h4>
<p>A matrix may have one or both dimensions zero, and operations on empty
matrices are handled as described by Carl de Boor in <cite>An Empty
Exercise</cite>, SIGNUM, Volume 25, pages 2-6, 1990 and C. N. Nett and W. M.
Haddad, in <cite>A System-Theoretic Appropriate Realization of the Empty
Matrix Concept</cite>, IEEE Transactions on Automatic Control, Volume 38,
Number 5, May 1993.
Briefly, given a scalar <var>s</var>, an <var>m</var> by
<var>n</var> matrix <code>M(mxn)</code>, and an <var>m</var> by <var>n</var> empty matrix
<code>[](mxn)</code> (with either one or both dimensions equal to zero), the
following are true:
<pre class="example"> s * [](mxn) = [](mxn) * s = [](mxn)
[](mxn) + [](mxn) = [](mxn)
[](0xm) * M(mxn) = [](0xn)
M(mxn) * [](nx0) = [](mx0)
[](mx0) * [](0xn) = 0(mxn)
</pre>
<p>By default, dimensions of the empty matrix are printed along with the
empty matrix symbol, ‘<samp><span class="samp">[]</span></samp>’. The built-in variable
<code>print_empty_dimensions</code> controls this behavior.
<!-- pr-output.cc -->
<p><a name="doc_002dprint_005fempty_005fdimensions"></a>
<div class="defun">
— Built-in Function: <var>val</var> = <b>print_empty_dimensions</b> ()<var><a name="index-print_005fempty_005fdimensions-229"></a></var><br>
— Built-in Function: <var>old_val</var> = <b>print_empty_dimensions</b> (<var>new_val</var>)<var><a name="index-print_005fempty_005fdimensions-230"></a></var><br>
<blockquote><p>Query or set the internal variable that controls whether the
dimensions of empty matrices are printed along with the empty matrix
symbol, ‘<samp><span class="samp">[]</span></samp>’. For example, the expression
<pre class="example"> zeros (3, 0)
</pre>
<p class="noindent">will print
<pre class="example"> ans = [](3x0)
</pre>
</blockquote></div>
<p>Empty matrices may also be used in assignment statements as a convenient
way to delete rows or columns of matrices.
See <a href="Assignment-Ops.html#Assignment-Ops">Assignment Expressions</a>.
<p>When Octave parses a matrix expression, it examines the elements of the
list to determine whether they are all constants. If they are, it
replaces the list with a single matrix constant.
</body></html>
|