"math">\(w\)</span> <em>and</em> <span class="math">\(x\)</span>.</p>
<p>We can implement the Huber penalty function in CVX as follows:</p>
<div class="highlight-none"><div class="highlight"><pre>function cvx_optval = huber( x )
cvx_begin
    variables w v;
    minimize( w^2 + 2 * v );
    subject to
        abs( x ) &lt;= w + v;
        w &lt;= 1; v &gt;= 0;
cvx_end
</pre></div>
</div>
<p>If <tt class="docutils literal"><span class="pre">huber</span></tt> is called with a numeric value of <tt class="docuti