l(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);
<span class="keyword">end</span>
</pre><p>The Hessian of the standard constraints cannot be defined by the anonymous function and is thus defined by function <tt>bex3_conhess</tt> shown below:
         </p><pre class="codeinput"><span class="keyword">function</span> [ddgk, userdata] = bex3_conhess(x,Y,k,userdata)
  <span class="keyword">switch</span>(k)
  <span class="keyword">case</span> (1)
  