function y = xemx(x) % xemx Evaluate x*exp(-x), where x is a scalar or vector y = x.*exp(-x);