nf  inf 1  inf];
xsol = fminsearchcon(@(x) norm(x),[1 3 1 1],LB,UB,[],[],[],opts)
</pre><pre class="codeoutput">
xsol =

  -4.9034e-07            2            1   5.1394e-07

</pre><h2>All the standard outputs from fminsearch are still returned<a name="12"></a></h2><pre class="codeinput">[xsol,fval,exitflag,output] = fminsearchcon(@(x) norm(x),[1 3 1 1],LB,UB)
</pre><pre class="codeoutput">
xsol =

   3.1094e-05            2            1  -5.1706e-05


fval =

       2.2361


exitflag =

     1


output = 
