%
%  First example for fop0
%
function [f1,f2]=fop0_1(u,s,t,flg)
%
%  s = [w x]'
%
a = -0.8; b = 0.2; xf = 0.1;
%
w = s(1); x = s(2); 
if flg == 1,
   f1 = [0.5*u*u; a*x+b*u];
elseif flg == 2
   f1 = 0.5*(x-xf)*(x-xf)+w; f2 = [1 (x-xf)];
elseif flg == 3
      f1 = [0 0; 0 a]; f2 = [u; b];
end;
      