m.objfun = @ex1_objfun;
  penm.confun = @ex1_confun;
  penm.objgrad = @ex1_objgrad;
  penm.congrad = @ex1_congrad;
  penm.objhess = @ex1_objhess;
  penm.conhess = @ex1_conhess;
end
%%%
% To solve this example, we execute the following commands:
%
%  penm = ex1_define;
%  prob = penlab(penm);
%  prob.solve();
%  x = prob.x;
%
% *Example 2*
% Next, consider a toy nonlinear SDP example in two variables
%
% $$ \min \frac{1}{2}(x_1^2 + x_2^2)$$
%
% subject to
%
% $\pmatrix{1& x_1-1& 0\cr x_