function y=f(x)
y=(x^2+2*x)*exp(-x)
endfunction
// values of x are specified using the linspace, -2 is smallest, 5 largest, 50
x=linspace(-2,5,50);
plot(x,f)
