/usr/share/doc/pyxplot/html/sect0050.html is in pyxplot-doc 0.9.2-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="plasTeX" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<title>PyXPlot Users' Guide: Matrix algebra</title>
<link href="sec-vectorplot.html" title="Plotting data from vectors" rel="next" />
<link href="sect0049.html" title="Dot and cross products" rel="prev" />
<link href="sec-vectors.html" title="Vectors and matrices" rel="up" />
<link rel="stylesheet" href="styles/styles.css" />
</head>
<body>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sect0049.html" title="Dot and cross products"><img alt="Previous: Dot and cross products" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="sec-vectors.html" title="Vectors and matrices"><img alt="Up: Vectors and matrices" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sec-vectorplot.html" title="Plotting data from vectors"><img alt="Next: Plotting data from vectors" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><a href="sect0288.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<div class="breadcrumbs">
<span>
<span>
<a href="index.html">PyXPlot Users' Guide</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sect0001.html">Introduction to PyXPlot</a> <b>:</b>
</span>
</span><span>
<span>
<a href="chap-progDataTypes.html">Programming: Pyxplot’s data types</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sec-vectors.html">Vectors and matrices</a> <b>:</b>
</span>
</span><span>
<span>
<b class="current">Matrix algebra</b>
</span>
</span>
<hr />
</div>
<div><h2 id="a0000000051">6.5.2 Matrix algebra</h2>
<p>Matrices can be multiplied by one another and by vectors to perform matrix arithmetic. This not only allows matrix equations to be solved, but also allows transformation matrices to be applied to vector positions on the vector graphics canvas. All of Pyxplot’s vector graphics commands, which will be described in detail in Chapter <a href="ch-vector_graphics.html">3</a>, can accept positions as either comma-separated numerical components, or as vector objects. The following example demonstrates the use of a rotation matrix: </p><pre>
rotate(a) = matrix( [[cos(a),-sin(a)], \
[sin(a), cos(a)] ] )
pos = vector(0,5)*unit(cm)
theta = 30*unit(deg)
arrow from 0,0 to rotate(theta)*pos with linewidth 3
</pre><p>In addition to matrix multiplication, other arithmetic operations are available via the methods of matrix objects. Their methods <tt class="tt">diagonal()</tt> and <tt class="tt">symmetric()</tt> return <tt class="tt">true</tt> or <tt class="tt">false</tt> as appropriate. Their <tt class="tt">size()</tt> method returns the vector size of the matrix (rows, columns). Their <tt class="tt">det()</tt> method returns the determinate of the matrix and their <tt class="tt">transpose()</tt> method returns the matrix transpose. </p><p>Among more complex operations, <tt class="tt">inv()</tt> returns the inverse of a matrix, <tt class="tt">eigenvalues()</tt> returns a vector of the matrix’s eigenvalues, and <tt class="tt">eigenvectors()</tt> returns a list of the matrix’s corresponding eigenvectors. </p></div>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sect0049.html" title="Dot and cross products"><img alt="Previous: Dot and cross products" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="sec-vectors.html" title="Vectors and matrices"><img alt="Up: Vectors and matrices" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sec-vectorplot.html" title="Plotting data from vectors"><img alt="Next: Plotting data from vectors" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><a href="sect0288.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<script language="javascript" src="icons/imgadjust.js" type="text/javascript"></script>
</body>
</html>
|