next up previous contents
Next: Exercise 12 Up: Polynomials (1) Previous: Polynomials (1)

Exercise 11

The roots of a 4th-degree polynomial are $-4,-2,2,4$ and it intersects the y-axis at
($y=-64$). Calculate its coefficients:
2 Solutions:
>> a=poly([-4,-2,2,4])
a = [ 1  0  -20  0  64 ]
>> a = -64/polyval(a,0) * a
a = 
  -1   0    20   0    -64 
>> a = polyfit([-4,-2,2,4,0],[0,0,0,0,-64],4)
a = 
  -1   0    20   0    -64
0

0


Helmut Dersch
2009-03-15