/usr/share/doc/pyxplot/html/sec-functions.html is in pyxplot-doc 0.8.4-3.
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 100 101 102 103 104 105 | <!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: Functions</title>
<link href="ex-funcsplice.html" title="Spliced Functions" rel="next" />
<link href="sec-constants.html" title="Physical Constants" rel="prev" />
<link href="sect0019.html" title="Performing Calculations" 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="sec-constants.html" title="Physical Constants"><img alt="Previous: Physical Constants" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="sect0019.html" title="Performing Calculations"><img alt="Up: Performing Calculations" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="ex-funcsplice.html" title="Spliced Functions"><img alt="Next: Spliced Functions" 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="sect0255.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="sect0019.html">Performing Calculations</a> <b>:</b>
</span>
</span><span>
<span>
<b class="current">Functions</b>
</span>
</span>
<hr />
</div>
<div><h1 id="sec:functions">4.3 Functions</h1>
<p>A large number of standard functions are pre-defined within PyXPlot’s mathematical environment, ranging from trigonometric functions to very specialised functions such as the phase of the Moon on any given day or the size of the Universe in the <img src="images/img-0072.png" alt="$\Uplambda _\mathrm {CDM}$" style="vertical-align:-3px;
width:48px;
height:17px" class="math gen" /> cosmological model. A complete list of these can be obtained by typing <tt class="tt">show functions</tt><a name="a0000000408" id="a0000000408"></a> or by consulting Chapter <a href="ch-function_list.html">2</a>. In addition, the user can define his own functions to equal any algebraic expressions using a similar syntax to that used to declare new variables, as in the examples: </p><pre>
f() = pi
g(x) = x*sin(x)
h(x,y) = x*y
</pre><p>A list of all of the user-defined functions which have been set can be found at the end of the output of the <tt class="tt">show functions</tt> command<a name="a0000000409" id="a0000000409"></a>, or can be obtained without the list of system-defined functions by typing <tt class="tt">show userfunctions</tt><a name="a0000000410" id="a0000000410"></a>. Unlike in the case of pre-defined variables, system-defined functions may not be over-written; trying to define a function with the name <tt class="tt">sin(x)</tt>, for example, will result in an error. Once defined, user-defined functions can be undefined by typing, for example: </p><pre>
f() =
</pre><p>Where the logic required to define a particular function is greater than can be contained in a single algebraic expression, a subroutine should be used (see Section <a href="ex-pendulum.html">6.9</a>); these allow an arbitrary numbers of lines of PyXPlot code to be executed whenever a function is evaluated. </p></div>
<div class="contents section-contents"><!--<strong>Subsections</strong>-->
<ul>
<li><a href="ex-funcsplice.html">4.3.1 Spliced Functions</a>
</li>
</ul>
</div>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sec-constants.html" title="Physical Constants"><img alt="Previous: Physical Constants" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="sect0019.html" title="Performing Calculations"><img alt="Up: Performing Calculations" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="ex-funcsplice.html" title="Spliced Functions"><img alt="Next: Spliced Functions" 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="sect0255.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>
|