% tent function centered at 1/2 and of approx width 1/5 function f = smoothbump(x) f = exp(-800*(x-1/2).^2);