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
|
<html lang="en">
<head>
<title>Derivatives / Integrals / Transforms - 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="Polynomial-Manipulations.html#Polynomial-Manipulations" title="Polynomial Manipulations">
<link rel="prev" href="Products-of-Polynomials.html#Products-of-Polynomials" title="Products of Polynomials">
<link rel="next" href="Polynomial-Interpolation.html#Polynomial-Interpolation" title="Polynomial Interpolation">
<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="Derivatives-%2f-Integrals-%2f-Transforms"></a>
<a name="Derivatives-_002f-Integrals-_002f-Transforms"></a>
<p>
Next: <a rel="next" accesskey="n" href="Polynomial-Interpolation.html#Polynomial-Interpolation">Polynomial Interpolation</a>,
Previous: <a rel="previous" accesskey="p" href="Products-of-Polynomials.html#Products-of-Polynomials">Products of Polynomials</a>,
Up: <a rel="up" accesskey="u" href="Polynomial-Manipulations.html#Polynomial-Manipulations">Polynomial Manipulations</a>
<hr>
</div>
<h3 class="section">28.4 Derivatives / Integrals / Transforms</h3>
<p>Octave comes with functions for computing the derivative and the integral
of a polynomial. The functions <code>polyder</code> and <code>polyint</code>
both return new polynomials describing the result. As an example we'll
compute the definite integral of p(x) = x^2 + 1 from 0 to 3.
<pre class="example"> c = [1, 0, 1];
integral = polyint(c);
area = polyval(integral, 3) - polyval(integral, 0)
⇒ 12
</pre>
<!-- polyder scripts/polynomial/polyder.m -->
<p><a name="doc_002dpolyder"></a>
<div class="defun">
— Function File: <b>polyder</b> (<var>p</var>)<var><a name="index-polyder-2723"></a></var><br>
— Function File: [<var>k</var>] = <b>polyder</b> (<var>a, b</var>)<var><a name="index-polyder-2724"></a></var><br>
— Function File: [<var>q</var>, <var>d</var>] = <b>polyder</b> (<var>b, a</var>)<var><a name="index-polyder-2725"></a></var><br>
<blockquote><p>Return the coefficients of the derivative of the polynomial whose
coefficients are given by the vector <var>p</var>. If a pair of polynomials
is given, return the derivative of the product <var>a</var>*<var>b</var>.
If two inputs and two outputs are given, return the derivative of the
polynomial quotient <var>b</var>/<var>a</var>. The quotient numerator is
in <var>q</var> and the denominator in <var>d</var>.
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->
<p class="noindent"><strong>See also:</strong> <a href="doc_002dpolyint.html#doc_002dpolyint">polyint</a>, <a href="doc_002dpolyval.html#doc_002dpolyval">polyval</a>, <a href="doc_002dpolyreduce.html#doc_002dpolyreduce">polyreduce</a>.
</p></blockquote></div>
<!-- polyint scripts/polynomial/polyint.m -->
<p><a name="doc_002dpolyint"></a>
<div class="defun">
— Function File: <b>polyint</b> (<var>p</var>)<var><a name="index-polyint-2726"></a></var><br>
— Function File: <b>polyint</b> (<var>p, k</var>)<var><a name="index-polyint-2727"></a></var><br>
<blockquote><p>Return the coefficients of the integral of the polynomial whose
coefficients are represented by the vector <var>p</var>. The variable
<var>k</var> is the constant of integration, which by default is set to zero.
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->
<p class="noindent"><strong>See also:</strong> <a href="doc_002dpolyder.html#doc_002dpolyder">polyder</a>, <a href="doc_002dpolyval.html#doc_002dpolyval">polyval</a>.
</p></blockquote></div>
<!-- polyaffine scripts/polynomial/polyaffine.m -->
<p><a name="doc_002dpolyaffine"></a>
<div class="defun">
— Function File: <b>polyaffine</b> (<var>f, mu</var>)<var><a name="index-polyaffine-2728"></a></var><br>
<blockquote><p>Return the coefficients of the polynomial vector <var>f</var> after an affine
transformation. If <var>f</var> is the vector representing the polynomial f(x),
then <var>g</var><code> = polyaffine (</code><var>f</var><code>, </code><var>mu</var><code>)</code> is the vector
representing:
<pre class="example"> g(x) = f( (x - <var>mu</var>(1)) / <var>mu</var>(2) )
</pre>
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->
<p class="noindent"><strong>See also:</strong> <a href="doc_002dpolyval.html#doc_002dpolyval">polyval</a>, <a href="doc_002dpolyfit.html#doc_002dpolyfit">polyfit</a>.
</p></blockquote></div>
</body></html>
|