-1 0;...
      2*x(1) 2*x(2) 2*x(3) 2*x(4) 0 -1]', userdata);
  penm.conhess = @bex3_conhess;
  
  penm.mconfun  = @(x,Y,k,userdata) deal(A{1}*x(1)+A{2}*x(2)+A{3}*x(3)+A{4}*x(4), userdata);
  penm.mcongrad = @(x,Y,k,i,userdata) deal(A{i}, userdata);
end
%%%  
% The Hessian of the standard constraints cannot be defined by the
% anonymous function and is thus defined by function |bex3_conhess| shown
% below:

function [ddgk, userdata] = bex3_conhess(x,Y,k,userdata)
  switch(k)
  case (1)
    dd