Return the coefficients of the polynomial vector f after an affine transformation.
If f is the vector representing the polynomial f(x), then
g = polyaffine (f, mu)
is the vector representing:
g(x) = f( (x - mu(1)) / mu(2) )
See also: polyval, polyfit.
The following code
f = [1/5 4/5 -7/5 -2]; g = polyaffine (f, [1, 1.2]); x = linspace (-4,4,100); plot (x,polyval (f, x), x,polyval (g, x)); legend ("original", "affine"); axis ([-4 4 -3 5]); grid on;
Produces the following figure
Figure 1 |
---|
Package: octave