Polynomials are represented by their coefficient vectors.
For example, the cubic polynomial
is entered typing
at the prompt. With
, we evaluate the polynomial
at some point or vector
.
After typing
, the vector
will contain approximations for the roots of the polynomial.
The complement to the roots command is poly, e.g,
returns the coefficient vector of the monic
polynomial which has its roots in
.
We can group commands into .m files, defining functions. The name of the function should match the file name. For this project, we need the function ``weierstrass'', with its definition in the file ``weierstrass.m'' (download it from the class web site). If the path is set correctly (do help path otherwise to see how to set the search path), then you can call this function just as a regular command.