
279
POLYROOT([coeff1,coeff2,…])
This function returns the roots of the
polynomial whose coefficients are specified.
The coefficients must be input as a vector in
square brackets.
Eg. Using our earlier function of
3
( )
(
2)(
3)(
1)
7
6
f x
x
x
x
x
x
=
−
+
− =
−
+
we
can enter the coefficients as [1,0,-7,6].
As you can see in the screen shot, the roots of 2, -3 and 1 have been
correctly found.