function fval = f(xy) fval = xy(1)*(1-xy(1)) + xy(2)*(2-xy(2));