comparison doc/interpreter/poly.texi @ 3180:c17387059fd3

[project @ 1998-09-24 18:59:11 by jwe]
author jwe
date Thu, 24 Sep 1998 19:00:19 +0000
parents 91589ab98e37
children
comparison
equal deleted inserted replaced
3179:f657159c8152 3180:c17387059fd3
103 @deftypefn {Function File} {} polyderiv (@var{c}) 103 @deftypefn {Function File} {} polyderiv (@var{c})
104 Return the coefficients of the derivative of the polynomial whose 104 Return the coefficients of the derivative of the polynomial whose
105 coefficients are given by vector @var{c}. 105 coefficients are given by vector @var{c}.
106 @end deftypefn 106 @end deftypefn
107 107
108 @deftypefn {Function File} {} polyfit (@var{n}, @var{y}, @var{n}) 108 @deftypefn {Function File} {[@var{p}, @var{yf}] =} polyfit (@var{x}, @var{y}, @var{n})
109 Return the coefficients of a polynomial @var{p}(@var{x}) of degree 109 Return the coefficients of a polynomial @var{p}(@var{x}) of degree
110 @var{n} that minimizes 110 @var{n} that minimizes
111 @iftex 111 @iftex
112 @tex 112 @tex
113 $$ 113 $$
119 @code{sumsq (p(x(i)) - y(i))}, 119 @code{sumsq (p(x(i)) - y(i))},
120 @end ifinfo 120 @end ifinfo
121 to best fit the data in the least squares sense. 121 to best fit the data in the least squares sense.
122 @end deftypefn 122 @end deftypefn
123 123
124 If two output arguments are requested, the second contains the values of
125 the polynomial for each value of @var{x}.
126
124 @deftypefn {Function File} {} polyinteg (@var{c}) 127 @deftypefn {Function File} {} polyinteg (@var{c})
125 Return the coefficients of the integral the polynomial whose coefficients 128 Return the coefficients of the integral of the polynomial whose
126 are represented by the vector @var{c}. 129 coefficients are represented by the vector @var{c}.
127 130
128 The constant of integration is set to zero. 131 The constant of integration is set to zero.
129 @end deftypefn 132 @end deftypefn
130 133
131 @deftypefn {Function File} {} polyreduce (@var{c}) 134 @deftypefn {Function File} {} polyreduce (@var{c})