%Plots for Newton1-0.m, Ex.1
%(Selcuk Bayin, METU-NCC, bayin@metu.edu.tr)
clc
clear x
x=-2.5:1/10:2.5;
f=x.^6 + 2*x.^5 - 3*x.^4 - 10*x.^3 - 6*x.^2 + 8*x + 8;
plot(x,f)
grid
%%
%Another method 
clc
clear x
%x=-2.5:1/10:2.5;
fplot(@(x)[x.^6 + 2*x.^5 - 3*x.^4 - 10*x.^3 - 6*x.^2 + 8*x + 8],[-3,3])
grid