% Horner's algorithm to divide a polynomial p by the
% linear factor z-z0
%
% i.e.
%
% p(z) = q(z) (z-z0) + r
%
% Inputs
% p vector of polynomial coefficients, from highest to lowest degree
% z0 root of linear factor
%
% Outputs
% q vector of polynomial coefficients for the quotient polynomial
% r residual
function [q,r] = horner(p,z0)
% USE YOUR OWN FUNCTION