5 6]');
params = out.Params.Results;
params.Display = <span class="string">'final'</span>;
ncg(@(x) example1(x,3), pi./[4 5 6]',params);
</pre><pre class="codeoutput"> Iter  FuncEvals       F(X)          ||G(X)||/N        
------ --------- ---------------- ----------------
     0         1       2.65816330       0.77168096
     1         7      -0.63998759       0.78869570
     2        11      -0.79991790       0.60693819
     3        14      -0.99926100       0.03843827
     4        16      -0.99999997 