annotate doc/interpreter/poly.txi @ 8828:8463d1a2e544

Doc fixes. * 2]$$. => 2].$$ * @var{extrapval} => @var{extrapval}. * call helloworld.oct => called @file{helloworld.oct} * @itemize => @table @code * shows. => shows: * save => @code{save} * @ref{Breakpoints} => @pxref{Breakpoints} * add @noindent following example * which is computed => and compute it * clarify wording * remove comma * good => well * set => number * by writing => with the command * has the option of directly calling => can call * [-like-] {+of the right size,+} * solvers => routines * handle => test for * add introductory section * add following * {+the+} [0..bitmax] => [0,bitmax] * of the => with * number => value * add usual * Besides when doing comparisons, logical => Logical {+also+} * array comparison => array, comparisons * param => parameter * works very similar => is similar * strings, => strings * most simple => simplest * easier => more easily * like => as * called => called, * clarify wording * you should simply type => use * clarify wording * means => way * equally => also * [-way much-] {+way+} * add with mean value parameter given by the first argument, @var{l} * add Functions described as @dfn{mapping functions} apply the given operation to each element when given a matrix argument. * in this brief introduction => here * It is worth noticing => Note * add following * means => ways
author Brian Gough <bjg@network-theory.co.uk>
date Fri, 20 Feb 2009 11:17:01 -0500
parents 6f2d95255911
children eb63fbe60fab
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
1 @c Copyright (C) 1996, 1997, 1999, 2000, 2002, 2007 John W. Eaton
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
2 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
3 @c This file is part of Octave.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
4 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
5 @c Octave is free software; you can redistribute it and/or modify it
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
6 @c under the terms of the GNU General Public License as published by the
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
7 @c Free Software Foundation; either version 3 of the License, or (at
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
8 @c your option) any later version.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
9 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
13 @c for more details.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
14 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
15 @c You should have received a copy of the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
16 @c along with Octave; see the file COPYING. If not, see
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 7001
diff changeset
17 @c <http://www.gnu.org/licenses/>.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
18
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 3428
diff changeset
19 @node Polynomial Manipulations
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
20 @chapter Polynomial Manipulations
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
21
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
22 In Octave, a polynomial is represented by its coefficients (arranged
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
23 in descending order). For example, a vector @var{c} of length
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
24 @math{N+1} corresponds to the following polynomial of order
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
25 @iftex
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
26 @tex
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
27 $N$
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
28 $$
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
29 p (x) = c_1 x^N + \ldots + c_N x + c_{N+1}.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
30 $$
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
31 @end tex
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
32 @end iftex
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
33 @ifinfo
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
34 @var{N}
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
35
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
36 @example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
37 p(x) = @var{c}(1) x^@var{N} + ... + @var{c}(@var{N}) x + @var{c}(@var{N}+1).
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
38 @end example
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
39 @end ifinfo
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
40
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
41 @menu
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
42 * Evaluating Polynomials::
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
43 * Finding Roots::
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
44 * Products of Polynomials::
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
45 * Derivatives and Integrals::
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
46 * Polynomial Interpolation::
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
47 * Miscellaneous Functions::
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
48 @end menu
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
49
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
50 @node Evaluating Polynomials
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
51 @section Evaluating Polynomials
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
52
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
53 The value of a polynomial represented by the vector @var{c} can be evaluated
8828
8463d1a2e544 Doc fixes.
Brian Gough <bjg@network-theory.co.uk>
parents: 8286
diff changeset
54 at the point @var{x} very easily, as the following example shows:
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
55
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
56 @example
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
57 N = length(c)-1;
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
58 val = dot( x.^(N:-1:0), c );
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
59 @end example
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
60
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
61 @noindent
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
62 While the above example shows how easy it is to compute the value of a
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
63 polynomial, it isn't the most stable algorithm. With larger polynomials
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
64 you should use more elegant algorithms, such as Horner's Method, which
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
65 is exactly what the Octave function @code{polyval} does.
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
66
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
67 In the case where @var{x} is a square matrix, the polynomial given by
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
68 @var{c} is still well-defined. As when @var{x} is a scalar the obvious
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
69 implementation is easily expressed in Octave, but also in this case
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
70 more elegant algorithms perform better. The @code{polyvalm} function
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
71 provides such an algorithm.
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
72
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
73 @DOCSTRING(polyval)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
74
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
75 @DOCSTRING(polyvalm)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
76
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
77 @node Finding Roots
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
78 @section Finding Roots
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
79
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
80 Octave can find the roots of a given polynomial. This is done by computing
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
81 the companion matrix of the polynomial (see the @code{compan} function
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
82 for a definition), and then finding its eigenvalues.
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
83
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
84 @DOCSTRING(roots)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
85
3368
a4cd1e9d9962 [project @ 1999-11-20 17:22:48 by jwe]
jwe
parents: 3294
diff changeset
86 @DOCSTRING(compan)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
87
8286
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7640
diff changeset
88 @DOCSTRING(mpoles)
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7640
diff changeset
89
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
90 @node Products of Polynomials
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
91 @section Products of Polynomials
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
92
3368
a4cd1e9d9962 [project @ 1999-11-20 17:22:48 by jwe]
jwe
parents: 3294
diff changeset
93 @DOCSTRING(conv)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
94
7640
3398ce778b4b Added support for N-dimensional convolution
sh@sh-laptop
parents: 7018
diff changeset
95 @DOCSTRING(convn)
3398ce778b4b Added support for N-dimensional convolution
sh@sh-laptop
parents: 7018
diff changeset
96
3368
a4cd1e9d9962 [project @ 1999-11-20 17:22:48 by jwe]
jwe
parents: 3294
diff changeset
97 @DOCSTRING(deconv)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
98
6549
5a5a09d7deb8 [project @ 2007-04-20 06:55:29 by jwe]
jwe
parents: 6502
diff changeset
99 @DOCSTRING(conv2)
5a5a09d7deb8 [project @ 2007-04-20 06:55:29 by jwe]
jwe
parents: 6502
diff changeset
100
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
101 @DOCSTRING(polygcd)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
102
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
103 @DOCSTRING(residue)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
104
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
105 @node Derivatives and Integrals
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
106 @section Derivatives and Integrals
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
107
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
108 Octave comes with functions for computing the derivative and the integral
6898
f4e1bdb66535 [project @ 2007-09-14 05:20:43 by jwe]
jwe
parents: 6850
diff changeset
109 of a polynomial. The functions @code{polyderiv} and @code{polyint}
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
110 both return new polynomials describing the result. As an example we'll
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
111 compute the definite integral of @math{p(x) = x^2 + 1} from 0 to 3.
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
112
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
113 @example
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
114 c = [1, 0, 1];
6898
f4e1bdb66535 [project @ 2007-09-14 05:20:43 by jwe]
jwe
parents: 6850
diff changeset
115 integral = polyint(c);
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
116 area = polyval(integral, 3) - polyval(integral, 0)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
117 @result{} 12
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
118 @end example
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
119
3368
a4cd1e9d9962 [project @ 1999-11-20 17:22:48 by jwe]
jwe
parents: 3294
diff changeset
120 @DOCSTRING(polyderiv)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
121
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
122 @DOCSTRING(polyder)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
123
8286
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7640
diff changeset
124 @DOCSTRING(polyinteg)
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7640
diff changeset
125
6898
f4e1bdb66535 [project @ 2007-09-14 05:20:43 by jwe]
jwe
parents: 6850
diff changeset
126 @DOCSTRING(polyint)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
127
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
128 @node Polynomial Interpolation
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
129 @section Polynomial Interpolation
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
130
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
131 Octave comes with good support for various kinds of interpolation,
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
132 most of which are described in @ref{Interpolation}. One simple alternative
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
133 to the functions described in the aforementioned chapter, is to fit
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
134 a single polynomial to some given data points. To avoid a highly
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
135 fluctuating polynomial, one most often wants to fit a low-order polynomial
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
136 to data. This usually means that it is necessary to fit the polynomial
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
137 in a least-squares sense, which is what the @code{polyfit} function does.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
138
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
139 @DOCSTRING(polyfit)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
140
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
141 In situations where a single polynomial isn't good enough, a solution
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
142 is to use several polynomials pieced together. The function @code{mkpp}
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
143 creates a piece-wise polynomial, @code{ppval} evaluates the function
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
144 created by @code{mkpp}, and @code{unmkpp} returns detailed information
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
145 about the function.
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
146
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
147 The following example shows how to combine two linear functions and a
7001
8b0cfeb06365 [project @ 2007-10-10 18:02:59 by jwe]
jwe
parents: 6898
diff changeset
148 quadratic into one function. Each of these functions is expressed
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
149 on adjoined intervals.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
150
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
151 @example
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
152 x = [-2, -1, 1, 2];
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
153 p = [ 0, 1, 0;
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
154 1, -2, 1;
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
155 0, -1, 1 ];
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
156 pp = mkpp(x, p);
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
157 xi = linspace(-2, 2, 50);
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
158 yi = ppval(pp, xi);
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
159 plot(xi, yi);
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
160 @end example
6502
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
161
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
162 @DOCSTRING(ppval)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
163
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
164 @DOCSTRING(mkpp)
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
165
6ab0a8767780 [project @ 2007-04-06 03:32:06 by jwe]
jwe
parents: 4167
diff changeset
166 @DOCSTRING(unmkpp)
6850
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
167
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
168 @node Miscellaneous Functions
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
169 @section Miscellaneous Functions
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
170
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
171 @DOCSTRING(poly)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
172
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
173 @DOCSTRING(polyout)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
174
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
175 @DOCSTRING(polyreduce)
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
176
9398f6a81bdf [project @ 2007-08-31 17:29:22 by jwe]
jwe
parents: 6778
diff changeset
177
8286
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7640
diff changeset
178
6f2d95255911 fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents: 7640
diff changeset
179