% A slightly different example
% Minas Spetsakis, Jan. 2018


x1 = -2;
x2 = 5;
nump = 300;

X=linspace(x1,x2,nump);
% F=2*X.^2-10*X+10;
F = sin(X*pi).*exp(X);  % notice the element-wise vector multiplication
plot(X,F,'r')
