clear all; close all;


% p = [1, 3, 2, -2, 1]; % Create a polynomial f(x) = x^4 +3x^3 + 2x^2 -2x +1

% p = [1,0, 0, 0]; % Create a polynomial f(x) = x^4

% p = [2,-1,-20];  % Create a polynomial 2x^2 - x - 20

 p = [-2,-1,20];  % Create a polynomial -2x^2 - x + 20

% p = [1,0,0]; % Create a polynomial f(x) = x^2  (Even Function)

% p = [4,0,-1,0];  % Create a polynomial f(x) = 4x^3 - x (Odd Function)


% Create some x values to evaluate f(x)
xmin = -4.0;
xmax = 4.0;
xstep = 0.1;

yoffset = 10.0; % Extend axes beoynd range of y for pot

x=xmin:xstep:xmax; % Create some x values to evaluate f(x)

% Solve and Plot polynomial p
poly_plot(p,xmin,xmax,xstep,yoffset)


