ere is an example call to the cp_opt method. By default, each iteration prints the least squares fit function value (being minimized) and the norm of the gradient. The meaning of any line search warnings can be checked via <a href="matlab:doc('cvsrch')">doc cvsrch</a>.</p><pre class="codeinput">[M,~,output] = cp_wopt(X, P, R, <span class="string">'init'</span>, M_init, <span class="keyword">...</span>
    <span class="string">'opt'</span>, <span class="string">'ncg'</span>, <span class="string">'opt_options