function fofp = parabola(x, job, err) if nargin == 2 err = 0; end if job == 0 fofp = (x - 1)^2 - 1 + err*randn(1); else fofp = 2*(x-1); end