Page MenuHomec4science

funcref.html
No OneTemporary

File Metadata

Created
Wed, Jul 9, 04:51

funcref.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Reference guide &mdash; CVX Users&#39; Guide</title>
<link rel="stylesheet" href="_static/cloud.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Noticia+Text|Open+Sans|Droid+Sans+Mono" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/cloud.js"></script>
<link rel="top" title="CVX Users&#39; Guide" href="index.html" />
<link rel="next" title="Support" href="support.html" />
<link rel="prev" title="Solvers" href="solver.html" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="relbar-top">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="support.html" title="Support"
accesskey="N">next</a> &nbsp; &nbsp;</li>
<li class="right" >
<a href="solver.html" title="Solvers"
accesskey="P">previous</a> &nbsp; &nbsp;</li>
<li><a href="index.html">CVX Users&#39; Guide</a> &raquo;</li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="reference-guide">
<span id="funcref"></span><h1>Reference guide<a class="headerlink" href="#reference-guide" title="Permalink to this headline"></a></h1>
<p>In this section we describe each operator, function, set, and command that you are
likely to encounter in CVX. In some cases, limitations of the underlying solver
place certain restrictions or caveats on their use:</p>
<ul class="simple">
<li>Functions marked with a dagger (†) are not supported natively by the
solvers that CVX uses. They are handled using a successive
approximation method which makes multiple calls to the underlying
solver, achieving the same final precision. If you use one of these
functions, you will be warned that successive approximation will be
used. This technique is discussed further in
<a class="reference internal" href="advanced.html#successive"><em>The successive approximation method</em></a>. As this section discusses, this is an experimental
approach that works well in many cases, but cannot be guaranteed.</li>
<li>Functions involving powers (<em>e.g.</em>, <tt class="docutils literal"><span class="pre">x^p</span></tt>) and <span class="math">\(p\)</span>-norms
(<em>e.g.</em>, <tt class="docutils literal"><span class="pre">norm(x,p)</span></tt>) are marked with a double dagger (‡). CVX
represents these functions exactly when <span class="math">\(p\)</span> is a rational
number. For irrational values of <tt class="docutils literal"><span class="pre">p</span></tt>, a nearby rational is selected
instead. See <a class="reference internal" href="advanced.html#powerfunc"><em>Power functions and p-norms</em></a> for details on
how both cases are handled.</li>
</ul>
<div class="section" id="arithmetic-operators">
<h2>Arithmetic operators<a class="headerlink" href="#arithmetic-operators" title="Permalink to this headline"></a></h2>
<p>Matlab&#8217;s standard arithmetic operations for addition <tt class="docutils literal"><span class="pre">+</span></tt>, subtraction <tt class="docutils literal"><span class="pre">-</span></tt>,
multiplication, <tt class="docutils literal"><span class="pre">*</span></tt> <tt class="docutils literal"><span class="pre">.*</span></tt>, division <tt class="docutils literal"><span class="pre">/</span></tt> <tt class="docutils literal"><span class="pre">./</span></tt> <tt class="docutils literal"><span class="pre">\</span></tt> <tt class="docutils literal"><span class="pre">.\</span></tt>, and
exponentiation <tt class="docutils literal"><span class="pre">^</span></tt> <tt class="docutils literal"><span class="pre">.^</span></tt> have been overloaded to work in
CVX whenever appropriate&#8212;that is, whenever their use is consistent
with both standard mathematical and Matlab conventions <em>and</em> the DCP
ruleset. For example:</p>
<ul class="simple">
<li>Two CVX expressions can be added together if they are of the same
dimension (or one is scalar) and have the same curvature (<em>i.e.</em>,
both are convex, concave, or affine).</li>
<li>A CVX expression can be multiplied or divided by a scalar
constant. If the constant is positive, the curvature is preserved; if
it is negative, curvature is reversed.</li>
<li>An affine column vector CVX expression can be multiplied by a
constant matrix of appropriate dimensions; or it can be left-divided
by a non-singular constant matrix of appropriate dimension.</li>
</ul>
<p>Numerous other combinations are possible, of course. The use of the exponentiation
operators <tt class="docutils literal"><span class="pre">^</span></tt> <tt class="docutils literal"><span class="pre">.^</span></tt> are somewhat limited;
see the definitions of <tt class="docutils literal"><span class="pre">power</span></tt> in <a class="reference internal" href="#nonlinear"><em>Nonlinear</em></a> below.</p>
<p>Matlab&#8217;s basic matrix manipulation and arithmetic operations have been
extended to work with CVX expressions as well, including:</p>
<ul class="simple">
<li>Concatenation: <tt class="docutils literal"><span class="pre">[</span> <span class="pre">A,</span> <span class="pre">B</span> <span class="pre">;</span> <span class="pre">C,</span> <span class="pre">D</span> <span class="pre">]</span></tt></li>
<li>Indexing: <tt class="docutils literal"><span class="pre">x(n+1:end)</span></tt>, <tt class="docutils literal"><span class="pre">X([3,4],:)</span></tt>, <em>etc.</em></li>
<li>Indexed assignment, including deletion: <tt class="docutils literal"><span class="pre">y(2:4)</span> <span class="pre">=</span> <span class="pre">1</span></tt>,
<tt class="docutils literal"><span class="pre">Z(1:4,:)</span> <span class="pre">=</span> <span class="pre">[]</span></tt>, <em>etc.</em></li>
<li>Transpose and conjugate transpose: <tt class="docutils literal"><span class="pre">Z.'</span></tt>, <tt class="docutils literal"><span class="pre">y'</span></tt></li>
</ul>
</div>
<div class="section" id="built-in-functions">
<span id="builtin"></span><h2>Built-in functions<a class="headerlink" href="#built-in-functions" title="Permalink to this headline"></a></h2>
<div class="section" id="linear">
<h3>Linear<a class="headerlink" href="#linear" title="Permalink to this headline"></a></h3>
<p>A number of Matlab&#8217;s basic linear and bilinear functions either work automatically
with <tt class="docutils literal"><span class="pre">cvx</span></tt> expressions or have been extended to do so, including:
<tt class="docutils literal"><span class="pre">conj</span></tt>, <tt class="docutils literal"><span class="pre">conv</span></tt>, <tt class="docutils literal"><span class="pre">cumsum</span></tt>, <tt class="docutils literal"><span class="pre">diag</span></tt>, <tt class="docutils literal"><span class="pre">dot</span></tt>,
<tt class="docutils literal"><span class="pre">find</span></tt>, <tt class="docutils literal"><span class="pre">fliplr</span></tt>, <tt class="docutils literal"><span class="pre">flipud</span></tt>, <tt class="docutils literal"><span class="pre">flipdim</span></tt>,
<tt class="docutils literal"><span class="pre">horzcat</span></tt>, <tt class="docutils literal"><span class="pre">hankel</span></tt>, <tt class="docutils literal"><span class="pre">ipermute</span></tt>, <tt class="docutils literal"><span class="pre">kron</span></tt>, <tt class="docutils literal"><span class="pre">mean</span></tt>,
<tt class="docutils literal"><span class="pre">permute</span></tt>, <tt class="docutils literal"><span class="pre">repmat</span></tt>, <tt class="docutils literal"><span class="pre">reshape</span></tt>, <tt class="docutils literal"><span class="pre">rot90</span></tt>,
<tt class="docutils literal"><span class="pre">sparse</span></tt>, <tt class="docutils literal"><span class="pre">sum</span></tt>, <tt class="docutils literal"><span class="pre">trace</span></tt>, <tt class="docutils literal"><span class="pre">tril</span></tt>, <tt class="docutils literal"><span class="pre">triu</span></tt>,
<tt class="docutils literal"><span class="pre">toeplitz</span></tt>, <tt class="docutils literal"><span class="pre">vertcat</span></tt>.</p>
<p>Most should behave identically with CVX expressions as they do with
numeric expressions. Those that perform some sort of summation, such as
<tt class="docutils literal"><span class="pre">cumsum</span></tt>, <tt class="docutils literal"><span class="pre">sum</span></tt>, or multiplication, such as <tt class="docutils literal"><span class="pre">conv</span></tt>, <tt class="docutils literal"><span class="pre">dot</span></tt> or
<tt class="docutils literal"><span class="pre">kron</span></tt>, can only be used in accordance with the disciplined convex
programming rules. For example, <tt class="docutils literal"><span class="pre">kron(X,Y)</span></tt> is valid only if either
<tt class="docutils literal"><span class="pre">X</span></tt> or <tt class="docutils literal"><span class="pre">Y</span></tt> is constant; and <tt class="docutils literal"><span class="pre">trace(Z)</span></tt> is valid only if the
elements along the diagonal have the same curvature.</p>
</div>
<div class="section" id="nonlinear">
<span id="id1"></span><h3>Nonlinear<a class="headerlink" href="#nonlinear" title="Permalink to this headline"></a></h3>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">abs</span></tt></dt>
<dd>absolute value for real and complex arrays. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">exp</span></tt></dt>
<dd>exponential. Convex and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">log</span></tt></dt>
<dd>logarithm. Concave and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">max</span></tt></dt>
<dd>maximum. Convex and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">min</span></tt></dt>
<dd>minimum. Concave and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">norm</span></tt></dt>
<dd><p class="first">norms for real and complex vectors and matrices. Convex. Thus
function follows the Matlab conventions closely. Thus the
one-argument version <tt class="docutils literal"><span class="pre">norm(x)</span></tt> computes the 2-norm for vectors,
and the 2-norm (maximum singular value) for matrices. The
two-argument version <tt class="docutils literal"><span class="pre">norm(x,p)</span></tt> is supported as follows:</p>
<ul class="last simple">
<li>‡ For vectors, all values <span class="math">\(p\geq 1\)</span> are accepted.</li>
<li>For matrices, <tt class="docutils literal"><span class="pre">p</span></tt> must be <tt class="docutils literal"><span class="pre">1</span></tt>, <tt class="docutils literal"><span class="pre">2</span></tt>, <tt class="docutils literal"><span class="pre">Inf</span></tt>, or <tt class="docutils literal"><span class="pre">'Fro'</span></tt>.</li>
</ul>
</dd>
<dt><tt class="docutils literal"><span class="pre">polyval</span></tt></dt>
<dd><p class="first">polynomial evaluation. <tt class="docutils literal"><span class="pre">polyval(p,x)</span></tt>, where <tt class="docutils literal"><span class="pre">p</span></tt> is a vector of
length <tt class="docutils literal"><span class="pre">n</span></tt>, computes</p>
<div class="highlight-none"><div class="highlight"><pre>p(1) * x.^(n-1) + p(2) * x.^(n-2) + ... + p(n-1) * x + p(n)
</pre></div>
</div>
<p>This function can be used in CVX in two ways:</p>
<ul class="last simple">
<li>If <tt class="docutils literal"><span class="pre">p</span></tt> is a variable and <tt class="docutils literal"><span class="pre">x</span></tt> is a constant, then
<tt class="docutils literal"><span class="pre">polyval(x,p)</span></tt> computes a linear combination of the elements of
<tt class="docutils literal"><span class="pre">p</span></tt>. The combination must satisfy the DCP rules for addition
and scaling.</li>
<li>If <tt class="docutils literal"><span class="pre">p</span></tt> is a constant and <tt class="docutils literal"><span class="pre">x</span></tt> is a variable, then
<tt class="docutils literal"><span class="pre">polyval(x,p)</span></tt> constructs a polynomial function of the variable
<tt class="docutils literal"><span class="pre">x</span></tt>. The polynomial must be affine, convex, or concave, and
<tt class="docutils literal"><span class="pre">x</span></tt> must be real and affine.</li>
</ul>
</dd>
<dt><tt class="docutils literal"><span class="pre">power(x,p)</span></tt></dt>
<dd><p class="first"><tt class="docutils literal"><span class="pre">x^p</span></tt> and <tt class="docutils literal"><span class="pre">x.^p</span></tt>, where <tt class="docutils literal"><span class="pre">x</span></tt> is a real variable and and <tt class="docutils literal"><span class="pre">p</span></tt>
is a real constant. For <tt class="docutils literal"><span class="pre">x^p</span></tt>, both <tt class="docutils literal"><span class="pre">x</span></tt> and <tt class="docutils literal"><span class="pre">p</span></tt> must be
scalars. Only those values of <tt class="docutils literal"><span class="pre">p</span></tt> which can reasonably and
unambiguously interpreted as convex or concave are accepted:</p>
<ul class="simple">
<li><span class="math">\(p=0\)</span>. Constant. <tt class="docutils literal"><span class="pre">x.^p</span></tt> is treated as identically 1.</li>
<li><span class="math">\(0 &lt; p &lt; 1\)</span>. Concave. The argument <span class="math">\(x\)</span> must be
concave (or affine), and is implicitly constrained to be
nonnegative.</li>
<li><span class="math">\(p = 1\)</span>. Affine. <tt class="docutils literal"><span class="pre">x.^p</span></tt> is simply <tt class="docutils literal"><span class="pre">x</span></tt>.</li>
<li><span class="math">\(p \in \{2,4,6,8,...\}\)</span>. Convex. Argument <span class="math">\(x\)</span> must be
affine.</li>
<li><span class="math">\(p &gt; 1\)</span>, <span class="math">\(p\not\in\{2,3,4,5,...\}\)</span>. Convex. Argument
<span class="math">\(x\)</span> must be affine, and is implicitly constrained to be
nonnegative.</li>
</ul>
<p class="last">Negative and odd integral values of <span class="math">\(p\)</span> are not permitted, but
see the functions <tt class="docutils literal"><span class="pre">pow_p</span></tt>, <tt class="docutils literal"><span class="pre">pow_pos</span></tt>, and <tt class="docutils literal"><span class="pre">pow_abs</span></tt> in the
next section for useful alternatives.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">power(p,x)</span></tt></dt>
<dd><p class="first"><tt class="docutils literal"><span class="pre">p.^x</span></tt> and <tt class="docutils literal"><span class="pre">p^x</span></tt>, where <tt class="docutils literal"><span class="pre">p</span></tt> is a real constant and <tt class="docutils literal"><span class="pre">x</span></tt> is a
real variable. For <tt class="docutils literal"><span class="pre">p^x</span></tt>, both <tt class="docutils literal"><span class="pre">p</span></tt> and <tt class="docutils literal"><span class="pre">x</span></tt> must be scalars.
Valid values of <tt class="docutils literal"><span class="pre">p</span></tt> include:</p>
<ul class="simple">
<li><span class="math">\(p \in \{0,1\}\)</span>. Constant.</li>
<li><span class="math">\(0 &lt; p &lt; 1\)</span>. Convex and nonincreasing; <tt class="docutils literal"><span class="pre">x</span></tt> must be
concave.</li>
<li><span class="math">\(p &gt; 1\)</span>. Convex and nondecreasing; <tt class="docutils literal"><span class="pre">x</span></tt> must be convex.</li>
</ul>
<p class="last">Negative values of <tt class="docutils literal"><span class="pre">p</span></tt> are not permitted.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">std</span></tt></dt>
<dd>Standard deviation. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">sqrt</span></tt></dt>
<dd>Square root. Implicitly constrains its argument to be nonnegative.
Concave and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">var</span></tt></dt>
<dd>Variance. Convex.</dd>
</dl>
</div>
</div>
<div class="section" id="new-functions">
<span id="newfuncs"></span><h2>New functions<a class="headerlink" href="#new-functions" title="Permalink to this headline"></a></h2>
<p>Even though these functions were developed specifically for CVX,
they work outside of a CVX specification as well, when supplied with
numeric arguments.</p>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">avg_abs_dev</span></tt></dt>
<dd><dl class="first last docutils">
<dt>The average absolute deviation about the mean <span class="math">\(\mu(x)\)</span> of <span class="math">\(x\)</span>. Convex.</dt>
<dd><div class="first last math">
\[f_{\text{aad}}(x) = \frac{1}{n} \sum_{i=1}^n |x_i-\mu(x)| = \frac{1}{n} \sum_{i=1}^n \left| x_i - {\textstyle\frac{1}{n}\sum_i x_i}\right| = \frac{1}{n}\left\| (I-\tfrac{1}{n}\textbf{1}\textbf{1}^T)x \right\|_1.\]</div>
</dd>
</dl>
</dd>
<dt><tt class="docutils literal"><span class="pre">avg_abs_dev_med</span></tt></dt>
<dd><dl class="first last docutils">
<dt>The average absolute deviation about the median <span class="math">\(\mathop{\textrm{m}}(x)\)</span> of <span class="math">\(x\)</span>. Convex.</dt>
<dd><div class="first last math">
\[f_{\text{aadm}}(x) = \frac{1}{n} \sum_{i=1}^n |x_i-\mathop{\textrm{m}}(x)| = \inf_y \frac{1}{n} \sum_{i=1}^n |x_i-y|\]</div>
</dd>
</dl>
</dd>
<dt><tt class="docutils literal"><span class="pre">berhu(x,M)</span></tt></dt>
<dd><dl class="first docutils">
<dt>The reversed Huber function (hence, Berhu), defined as</dt>
<dd><div class="first last math">
\[\begin{split}f_{\text{berhu}}(x,M) \triangleq \begin{cases} |x| &amp; |x| \leq M \\ (|x|^2+M^2)/2M &amp; |x| \geq M \end{cases}\end{split}\]</div>
</dd>
</dl>
<p class="last">Convex. If <span class="math">\(M\)</span> is omitted, <span class="math">\(M=1\)</span> is assumed; but if supplied, it must be a positive constant.
Also callable with three arguments as <tt class="docutils literal"><span class="pre">berhu(x,M,t)</span></tt>, which computes <tt class="docutils literal"><span class="pre">t+t*berhu(x/t,M)</span></tt>,
useful for concomitant scale estimation (see <a class="reference internal" href="credits.html#owen06" id="id2">[Owen06]</a>).</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">det_inv</span></tt></dt>
<dd>determinant of inverse of a symmetric (or Hermitian) positive
definite matrix, <span class="math">\(\det X^{-1}\)</span>, which is the same as the
product of the inverses of the eigenvalues. When used inside a
CVX specification, <tt class="docutils literal"><span class="pre">det_inv</span></tt> constrains the matrix to be
symmetric (if real) or Hermitian (if complex) and positive
semidefinite. When used with numerical arguments, <tt class="docutils literal"><span class="pre">det_inv</span></tt>
returns <tt class="docutils literal"><span class="pre">+Inf</span></tt> if these constraints are not met. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">det_rootn</span></tt></dt>
<dd><span class="math">\(n\)</span>-th root of the determinant of a semidefinite matrix,
<span class="math">\((\det X)^{1/n}\)</span>. When used inside a CVX specification,
<tt class="docutils literal"><span class="pre">det_rootn</span></tt> constrains the matrix to be symmetric (if real) or
Hermitian (if complex) and positive semidefinite. When used with
numerical arguments, <tt class="docutils literal"><span class="pre">det_rootn</span></tt> returns <tt class="docutils literal"><span class="pre">-Inf</span></tt> if these
constraints are not met. Concave.</dd>
<dt><tt class="docutils literal"><span class="pre">det_root2n</span></tt></dt>
<dd>the <span class="math">\(2n\)</span>-th root of the determinant of a semidefinite matrix;
<em>i.e.</em>, <tt class="docutils literal"><span class="pre">det_root2n(X)=sqrt(det_rootn(X))</span></tt>. Concave. Maintained
solely for back-compatibility purposes.</dd>
<dt><tt class="docutils literal"><span class="pre">entr</span></tt></dt>
<dd>the elementwise entropy function: <tt class="docutils literal"><span class="pre">entr(x)=-x.*log(x)</span></tt>. Concave.
Returns <tt class="docutils literal"><span class="pre">-Inf</span></tt> when called with a constant argument that has a
negative entry.</dd>
<dt><tt class="docutils literal"><span class="pre">geo_mean</span></tt></dt>
<dd>the geometric mean of a vector,
<span class="math">\(\left( \prod_{k=1}^n x_k \right)^{1/n}\)</span>. When used inside a
CVX specification, <tt class="docutils literal"><span class="pre">geo_mean</span></tt> constrains the elements of the
vector to be nonnegative. When used with numerical arguments,
<tt class="docutils literal"><span class="pre">geo_mean</span></tt> returns <tt class="docutils literal"><span class="pre">-Inf</span></tt> if any element is negative. Concave
and increasing.</dd>
<dt><tt class="docutils literal"><span class="pre">huber(x,M)</span></tt></dt>
<dd><dl class="first docutils">
<dt>The Huber function, defined as</dt>
<dd><div class="first last math">
\[\begin{split}f_{\text{huber}}(x,M) \triangleq \begin{cases} |x|^2 &amp; |x| \leq M \\ 2M|x|-M^2 &amp; |x| \geq M \end{cases}\end{split}\]</div>
</dd>
</dl>
<p class="last">Convex. If $x$ is a vector or array, the function is applied on an elementwise basis. If $M$ is omitted, then $M=1$ is assumed; but if it supplied, it must be a positive constant. Also callable as <tt class="docutils literal"><span class="pre">huber(x,M,t)</span></tt>, which computes <tt class="docutils literal"><span class="pre">t+t*huber(x/t,M)</span></tt>, useful for concomitant scale estimation (see <a class="reference internal" href="credits.html#owen06" id="id3">[Owen06]</a>).</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">huber_circ(x,M)</span></tt></dt>
<dd><dl class="first docutils">
<dt>The circularly symmetric Huber function, defined as</dt>
<dd><div class="first last math">
\[\begin{split}f_{\text{huber\_circ}}(x,M) \triangleq \begin{cases} \|x\|_2^2 &amp; \|x\|_2 \leq M \\ 2M\|x\|_2-M^2 &amp; \|x\|_2 \geq M \end{cases}\end{split}\]</div>
</dd>
</dl>
<p class="last">Convex. Same (and implemented) as <tt class="docutils literal"><span class="pre">huber_pos(norm(x),M)</span></tt>.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">huber_pos(x,M)</span></tt></dt>
<dd>The same as the Huber function for nonnegative <tt class="docutils literal"><span class="pre">x</span></tt>; zero for
negative <tt class="docutils literal"><span class="pre">x</span></tt>. Convex and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">inv_pos</span></tt></dt>
<dd>The inverse of the positive portion, <span class="math">\(1/\max\{x,0\}\)</span>. Inside
CVX specification, imposes constraint that its argument is
positive. Outside CVX specification, returns <span class="math">\(+\infty\)</span> if
<span class="math">\(x\leq 0\)</span>. Convex and decreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">kl_div</span></tt></dt>
<dd><p class="first">Kullback-Leibler distance:</p>
<div class="math">
\[\begin{split}f_{\text{kl}}(x,y) \triangleq \begin{cases} x\log(x/y)-x+y &amp; x,y&gt;0 \\ 0 &amp; x=y=0 \\ +\infty &amp; \text{otherwise} \end{cases}\end{split}\]</div>
<p class="last">Convex. Outside CVX specification, returns <span class="math">\(+\infty\)</span> if arguments aren&#8217;t in the
domain.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">lambda_max</span></tt></dt>
<dd>maximum eigenvalue of a real symmetric or complex Hermitian matrix.
Inside CVX, imposes constraint that its argument is symmetric
(if real) or Hermitian (if complex). Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">lambda_min</span></tt></dt>
<dd>minimum eigenvalue of a real symmetric or complex Hermitian matrix.
Inside CVX, imposes constraint that its argument is symmetric
(if real) or Hermitian (if complex). Concave.</dd>
<dt><tt class="docutils literal"><span class="pre">lambda_sum_largest(X,k)</span></tt></dt>
<dd>sum of the largest <span class="math">\(k\)</span> values of a real symmetric or complex
Hermitian matrix. Inside CVX, imposes constraint that its
argument is symmetric (if real) or Hermitian (if complex). Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">lambda_sum_smallest(X,k)</span></tt></dt>
<dd>sum of the smallest <span class="math">\(k\)</span> values of a real symmetric or complex
Hermitian matrix. Inside CVX, imposes constraint that its
argument is symmetric (if real) or Hermitian (if complex). Concave.</dd>
<dt><tt class="docutils literal"><span class="pre">log_det</span></tt></dt>
<dd>log of determinant of a positive definite matrix,
<span class="math">\(\log \det(X)\)</span>. When used inside a CVX specification,
<tt class="docutils literal"><span class="pre">log_det</span></tt> constrains its argument to be symmetric (if real) or
Hermitian (if complex) and positive definite. With numerical
argument, <tt class="docutils literal"><span class="pre">log_det</span></tt> returns <tt class="docutils literal"><span class="pre">-Inf</span></tt> if these constraints are not
met. Concave.</dd>
<dt><tt class="docutils literal"><span class="pre">log_normcdf(x)</span></tt></dt>
<dd>logarithm of cumulative distribution function of standard normal
random variable. Concave and increasing. The current implementation
is a fairly crude SDP-representable approximation, with modest
accuracy over the interval <span class="math">\([-4,4]\)</span>; we intend to replace it
with a much better approximation at some point.</dd>
<dt><tt class="docutils literal"><span class="pre">log_prod(x)</span></tt></dt>
<dd><span class="math">\(\log\prod_i x_i\)</span> if when <span class="math">\(x\)</span> is positive; <span class="math">\(-\infty\)</span> otherwise.
Concave and nonincreasing. Equivalent to <tt class="docutils literal"><span class="pre">sum_log(x)</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">log_sum_exp(x)</span></tt></dt>
<dd>the logarithm of the sum of the elementwise exponentials of <tt class="docutils literal"><span class="pre">x</span></tt>.
Convex and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">logsumexp_sdp</span></tt></dt>
<dd>a polynomial approximation to the log-sum-exp function with global
absolute accuracy. This can be used to estimate the log-sum-exp
function without using the successive approximation method.</dd>
<dt><tt class="docutils literal"><span class="pre">matrix_frac(x,Y)</span></tt></dt>
<dd>matrix fractional function, <span class="math">\(x^TY^{-1}x\)</span>. In CVX, imposes constraint
that <span class="math">\(Y\)</span> is symmetric (or Hermitian) and positive definite; outside CVX,
returns <span class="math">\(+\infty\)</span> unless <span class="math">\(Y=Y^T\succ 0\)</span>. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">norm_largest(x,k)</span></tt></dt>
<dd>For real and complex vectors, returns the sum of the largest <tt class="docutils literal"><span class="pre">k</span></tt>
<em>magnitudes</em> in the vector <tt class="docutils literal"><span class="pre">x</span></tt>. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">norm_nuc(X)</span></tt></dt>
<dd>The sum of the singular values of a real or complex matrix <tt class="docutils literal"><span class="pre">X</span></tt>.
(This is the dual of the usual spectral matrix norm, <em>i.e.</em>, the
largest singular value.) Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">norms(x,p,dim)</span></tt>, <tt class="docutils literal"><span class="pre">norms_largest(x,k,dim)</span></tt></dt>
<dd>Computes <em>vector</em> norms along a specified dimension of a matrix or
N-d array. Useful for sum-of-norms and max-of-norms problems.
Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">poly_env(p,x)</span></tt></dt>
<dd><p class="first">Computes the value of the <em>convex or concave envelope</em> of the
polynomial described by <tt class="docutils literal"><span class="pre">p</span></tt> (in the <tt class="docutils literal"><span class="pre">polyval</span></tt> sense). <tt class="docutils literal"><span class="pre">p</span></tt> must
be a real constant vector whose length <tt class="docutils literal"><span class="pre">n</span></tt> is 0, 1, 2, 3, or some
other <em>odd</em> length; and <tt class="docutils literal"><span class="pre">x</span></tt> must be real and affine. The sign of
the first nonzero element of <tt class="docutils literal"><span class="pre">p</span></tt> determines whether a convex
(positive) or concave (negative) envelope is constructed. For
example, consider the function <span class="math">\(p(x)\triangleq (x^2-1)^2=x^4-2x^2+1\)</span>,
depicted along with its convex envelope in the figure below.</p>
<p>The two coincide when <span class="math">\(|x|\geq 1\)</span>, but deviate when
<span class="math">\(|x|&lt;1\)</span>. Attempting to call <tt class="docutils literal"><span class="pre">polyval([1,0,2,0,1],x)</span></tt> in a
CVX model would yield an error, but a call to <tt class="docutils literal"><span class="pre">poly_env([1,0,2,0,1],x)</span></tt>
yields a valid representation of the envelope. For convex or concave
polynomials, this function produces the same result as <tt class="docutils literal"><span class="pre">polyval</span></tt>.</p>
<div class="last figure">
<img alt="_images/envelope.pdf" src="_images/envelope.pdf" />
<p class="caption">The polynomial function <span class="math">\(p(x)=x^4-2x^2+1\)</span> and its convex envelope.</p>
</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">pos(x)</span></tt></dt>
<dd><span class="math">\(\max\{x,0\}\)</span>, for real <span class="math">\(x\)</span>. Convex and increasing.</dd>
<dt><tt class="docutils literal"><span class="pre">pow_abs(x,p)</span></tt></dt>
<dd><span class="math">\(|x|^p\)</span> for <span class="math">\(x\in\mathbf{R}\)</span> or <span class="math">\(x\in\mathbf{C}\)</span>
and <span class="math">\(p\geq 1\)</span>. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">pow_pos(x,p)</span></tt></dt>
<dd><span class="math">\(\max\{x,0\}^p\)</span> for <span class="math">\(x\in\mathbf{R}\)</span> and
<span class="math">\(p\geq 1\)</span>. Convex and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">pow_p(x,p)</span></tt></dt>
<dd><p class="first">for <span class="math">\(x\in\mathbf{R}\)</span> and real constant <span class="math">\(p\)</span>, computes nonnegative convex
and concave branches of the power function:</p>
<div class="last math">
\[\begin{split}\begin{array}{ccl}
p\leq 0 &amp; f_p(x) \triangleq \begin{cases} x^p &amp; x &gt; 0 \\ +\infty &amp; x \leq 0 \end{cases} &amp; \text{convex, nonincreasing} \\
0 &lt; p \leq 1 &amp; f_p(x) \triangleq \begin{cases} x^p &amp; x \geq 0 \\ -\infty &amp; x &lt; 0 \end{cases} &amp; \text{concave, nondecreasing} \\
p \geq 1 &amp; f_p(x) \triangleq \begin{cases} x^p &amp; x \geq 0 \\ +\infty &amp; x &lt; 0 \end{cases} &amp; \text{convex, nonmonotonic}
\end{array}\end{split}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">prod_inv(x)</span></tt></dt>
<dd><span class="math">\(\prod_i x_i^{-1}\)</span> when <span class="math">\(x\)</span> is positive; <span class="math">\(+\infty\)</span> otherwise. Convex
and nonincreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">quad_form(x,P)</span></tt></dt>
<dd><span class="math">\(x^TPx\)</span> for real <span class="math">\(x\)</span> and symmetric <span class="math">\(P\)</span>, and
<span class="math">\(x^HPx\)</span> for complex <span class="math">\(x\)</span> and Hermitian <span class="math">\(P\)</span>. Convex
in <span class="math">\(x\)</span> for <span class="math">\(P\)</span> constant and positive semidefinite;
concave in <span class="math">\(x\)</span> for <span class="math">\(P\)</span> constant and negative
semidefinite.</dd>
</dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Quadratic functions such as <tt class="docutils literal"><span class="pre">quad_form</span></tt>, <tt class="docutils literal"><span class="pre">sum_square</span></tt> can often be replaced
by the <tt class="docutils literal"><span class="pre">norm</span></tt> function without sacrificing equivalence. For numerical reasons,
this alternate formulation is <em>preferred</em>. Please see <a class="reference internal" href="advanced.html#quad-forms"><em>Eliminating quadratic forms</em></a> for
more information.</p>
</div>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">quad_over_lin(x,y)</span></tt></dt>
<dd><span class="math">\(x^Tx/y\)</span> for <span class="math">\(x \in \mathbf{R}^n\)</span>, <span class="math">\(y &gt;0\)</span>; for
<span class="math">\(x \in \mathbf{C}^n\)</span>, <span class="math">\(y&gt;0\)</span>, <span class="math">\(x^*x/y\)</span>. In CVX
specification, adds constraint that <span class="math">\(y&gt;0\)</span>. Outside CVX
specification, returns <span class="math">\(+\infty\)</span> if <span class="math">\(y\leq 0\)</span>. Convex,
and decreasing in <span class="math">\(y\)</span>.</dd>
<dt><tt class="docutils literal"><span class="pre">quad_pos_over_lin(x,y)</span></tt></dt>
<dd><tt class="docutils literal"><span class="pre">sum_square_pos(</span> <span class="pre">x</span> <span class="pre">)/y</span></tt> for <span class="math">\(x\in\mathbf{R}^n\)</span>, <span class="math">\(y&gt;0\)</span>.
Convex, increasing in <span class="math">\(x\)</span>, and decreasing in <span class="math">\(y\)</span>.</dd>
<dt><tt class="docutils literal"><span class="pre">rel_entr(x)</span></tt></dt>
<dd>Scalar relative entropy; <tt class="docutils literal"><span class="pre">rel_entr(x,y)=x.*log(x/y)</span></tt>. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">sigma_max</span></tt></dt>
<dd>maximum singular value of real or complex matrix. Same as <tt class="docutils literal"><span class="pre">norm</span></tt>.
Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">square</span></tt></dt>
<dd><span class="math">\(x^2\)</span> for <span class="math">\(x \in \mathbf{R}\)</span>. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">square_abs</span></tt></dt>
<dd><span class="math">\(|x|^2\)</span> for <span class="math">\(x\in\mathbf{R}\)</span> or <span class="math">\(x\in\mathbf{C}\)</span>.</dd>
<dt><tt class="docutils literal"><span class="pre">square_pos</span></tt></dt>
<dd><span class="math">\(\max\{x,0\}^2\)</span> for <span class="math">\(x\in\mathbf{R}\)</span>. Convex and
increasing.</dd>
<dt><tt class="docutils literal"><span class="pre">sum_largest(x,k)</span></tt></dt>
<dd>sum of the largest <span class="math">\(k\)</span> values, for real vector <span class="math">\(x\)</span>. Convex and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">sum_log(x)</span></tt></dt>
<dd><span class="math">\(\sum_i\log(x_i)\)</span> when <span class="math">\(x\)</span> is positive; <span class="math">\(-\infty\)</span> otherwise.
Concave and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">sum_smallest(x,k)</span></tt></dt>
<dd>sum of the smallest <span class="math">\(k\)</span> values, <em>i.e.</em>, equivalent to <tt class="docutils literal"><span class="pre">-sum_largest(-x,k)</span></tt>. Concave and nondecreasing.</dd>
<dt><tt class="docutils literal"><span class="pre">sum_square</span></tt></dt>
<dd>Equivalent to <tt class="docutils literal"><span class="pre">sum(square(x))</span></tt>, but more efficient. Convex. Works only for real values.</dd>
<dt><tt class="docutils literal"><span class="pre">sum_square_abs</span></tt></dt>
<dd>Equivalent to <tt class="docutils literal"><span class="pre">sum(square_abs(x))</span></tt>, but more efficient. Convex.</dd>
<dt><tt class="docutils literal"><span class="pre">sum_square_pos</span></tt></dt>
<dd>Equivalent to <tt class="docutils literal"><span class="pre">sum(square_pos(x))</span></tt>, but more efficient. Works only for real values.
Convex and increasing.</dd>
<dt><tt class="docutils literal"><span class="pre">trace_inv(X)</span></tt></dt>
<dd>trace of the inverse of an SPD matrix <tt class="docutils literal"><span class="pre">X</span></tt>, which is the same as
the sum of the inverses of the eigenvalues. Convex. Outside of
CVX, returns <tt class="docutils literal"><span class="pre">+Inf</span></tt> if argument is not positive definite.</dd>
<dt><tt class="docutils literal"><span class="pre">trace_sqrtm(X)</span></tt></dt>
<dd>trace of the matrix square root of a positive semidefinite matrix
<tt class="docutils literal"><span class="pre">X</span></tt>. which is the same as the sum of the squareroots of the
eigenvalues. Concave. Outside of CVX, returns <tt class="docutils literal"><span class="pre">+Inf</span></tt> if
argument is not positive semidefinite.</dd>
</dl>
</div>
<div class="section" id="sets">
<span id="sets-ref"></span><h2>Sets<a class="headerlink" href="#sets" title="Permalink to this headline"></a></h2>
<p>CVX currently supports the following sets; in each case, <tt class="docutils literal"><span class="pre">n</span></tt> is a
positive integer constant.</p>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">nonnegative(n)</span></tt></dt>
<dd><div class="first last math">
\[R^n_+ \triangleq \left\{\,x\in\mathbf{R}^n\,~|~\,x_i\geq 0,~i=1,2,\dots,n\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">simplex(n)</span></tt></dt>
<dd><div class="first last math">
\[R^n_{1+} \triangleq \left\{\,x\in\mathbf{R}^n\,~|~\,x_i\geq 0,~i=1,2,\dots,n,~\textstyle\sum_ix_i=1\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">lorentz(n)</span></tt></dt>
<dd><div class="first last math">
\[\mathbf{Q}^n \triangleq \left\{\,(x,y)\in\mathbf{R}^n\times\mathbf{R}\,~|~\,\|x\|_2\leq y\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">rotated_lorentz(n)</span></tt></dt>
<dd><div class="first last math">
\[\mathbf{Q}^n_r \triangleq \left\{\,(x,y,z)\in\mathbf{R}^n\times\mathbf{R}\times\mathbf{R}\,~|~\,\|x\|_2\leq \sqrt{yz},~y,z\geq 0\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">complex_lorentz(n)</span></tt></dt>
<dd><div class="first last math">
\[\mathbf{Q}^n_c \triangleq \left\{\,(x,y)\in\mathbf{C}^n\times\mathbf{R}\,~|~\,\|x\|_2\leq y\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">rotated_complex_lorentz(n)</span></tt></dt>
<dd><div class="first last math">
\[\mathbf{Q}^n_{rc} \triangleq \left\{\,(x,y,z)\in\mathbf{C}^n\times\mathbf{R}\times\mathbf{R}\,~|~\,\|x\|_2\leq \sqrt{yz},~y,z\geq 0\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">semidefinite(n)</span></tt></dt>
<dd><div class="first last math">
\[\mathbf{S}^n_+ \triangleq \left\{\,X\in\mathbf{R}^{n\times n}\,~|~\,X=X^T,~X\succeq 0\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">hermitian_semidefinite(n)</span></tt></dt>
<dd><div class="first last math">
\[\mathbf{H}^n_+ \triangleq \left\{\,Z\in\mathbf{C}^{n\times n}\,~|~\,Z=Z^H,~X\succeq 0\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">nonneg_poly_coeffs(n)</span></tt></dt>
<dd><p class="first">The cone of all coefficients of nonnegative polynomials of degree <span class="math">\(n\)</span>; <span class="math">\(n\)</span> must be even:</p>
<div class="last math">
\[\mathbf{P}_{+,n} \triangleq \left\{\,p\in\mathbf{R}^n[n+1]\,~|~\,\sum_{i=0}^n p_{i+1} x^{n-i} \geq 0 ~ \forall x\in\mathbf{R}\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">convex_poly_coeffs(n)</span></tt></dt>
<dd><p class="first">The cone of all coefficients of convex polynomials of degree <span class="math">\(n\)</span>; <span class="math">\(n\)</span> must be even:</p>
<div class="last math">
\[\mathbf{P}_{+,n} \triangleq \left\{\,p\in\mathbf{R}^n[n+1]\,~|~\,\sum_{i=0}^{n-2} (n-i)(n-i-1) p_{i+1} x^{n-i-2} \geq 0 ~ \forall x\in\mathbf{R}\,\right\}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">exp_cone</span></tt></dt>
<dd><div class="first last math">
\[\begin{split}\mathbf{E} \triangleq \text{cl}\left\{\,(x,y,z)\in\mathbf{R}\times\mathbf{R}\times\mathbf{R}\,~|~\,y&gt;0,~ye^{x/y}\leq z\,\right\}\end{split}\]</div>
</dd>
<dt><tt class="docutils literal"><span class="pre">geo_mean_cone(n)</span></tt></dt>
<dd><div class="first last math">
\[\mathbf{G}_n \triangleq \text{cl}\left\{\,(x,y)\in\mathbf{R}^n\times\mathbf{R}^n\times\mathbf{R}^n\,~|~\,x\geq 0,~(\prod_{i=1}^n x_i)^{1/n} \geq y\,\right\}\]</div>
</dd>
</dl>
</div>
<div class="section" id="commands">
<h2>Commands<a class="headerlink" href="#commands" title="Permalink to this headline"></a></h2>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">cvx_begin</span></tt></dt>
<dd>Begins a new CVX model. If a model is already in progress, it will issue a warning
and clear it. See <a class="reference internal" href="basics.html#begin-end"><em>cvx_begin and cvx_end</em></a> for a full description, including the modifying
keywords that control solver output, SDP mode, GDP mode, etc.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_clear</span></tt></dt>
<dd>Clears any model being constructed. Useful when an error has been made and it is
necessary to start from the beginning. Whereas <tt class="docutils literal"><span class="pre">cvx_begin</span></tt> issues a warning if
called with a model in progress, <tt class="docutils literal"><span class="pre">cvx_clear</span></tt> is silent.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_end</span></tt></dt>
<dd>Signals the end of a CVX model. In typical use, this instructs CVX to begin the solution process.
See <a class="reference internal" href="basics.html#begin-end"><em>cvx_begin and cvx_end</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_expert</span></tt></dt>
<dd>Controls the issuance of warnings when models requiring the use of successive
approximation are employed; see <a class="reference internal" href="advanced.html#successive"><em>The successive approximation method</em></a> more details.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_power_warning</span></tt></dt>
<dd>Controls if and when CVX issues warnings during the construction of models involving
rational power functions (i.e., <tt class="docutils literal"><span class="pre">x^p</span></tt>, where <tt class="docutils literal"><span class="pre">x</span></tt> is a variable and <tt class="docutils literal"><span class="pre">p</span></tt> is a constant);
see <a class="reference internal" href="advanced.html#powerfunc"><em>Power functions and p-norms</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_precision</span></tt></dt>
<dd>Controls solver precision; see <a class="reference internal" href="solver.html#solver-precision"><em>Controlling precision</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_quiet</span></tt></dt>
<dd>Enables or disables screen output during the solution process; see <a class="reference internal" href="solver.html#solver-output"><em>Controlling screen output</em></a>.
Also see <a class="reference internal" href="basics.html#begin-end"><em>cvx_begin and cvx_end</em></a> for the newer, preferred syntax <tt class="docutils literal"><span class="pre">cvx_begin</span> <span class="pre">quiet</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_save_prefs</span></tt></dt>
<dd>Saves the current states for <tt class="docutils literal"><span class="pre">cvx_expert</span></tt>, <tt class="docutils literal"><span class="pre">cvx_power_warning</span></tt>, <tt class="docutils literal"><span class="pre">cvx_precision</span></tt>,
and <tt class="docutils literal"><span class="pre">cvx_solver</span></tt> to disk, so that their values are retained when quitting and
re-starting MATLAB. The file is saved in MATLAB&#8217;s preference directory, which can
be located by typing the <tt class="docutils literal"><span class="pre">prefdir</span></tt> command.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_setup</span></tt></dt>
<dd>The setup script used to install and configure CVX; see <a class="reference internal" href="install.html#install"><em>Installation</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_solver</span></tt></dt>
<dd>Selects the solver to be employed when solving CVX models; see <a class="reference internal" href="solver.html#solver-selection"><em>Selecting a solver</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_solver_settings</span></tt></dt>
<dd>Allows the user to deliver advanced, solver-specific settings to the solver that CVX
does not otherwise support; see <a class="reference internal" href="solver.html#solver-settings"><em>Advanced solver settings</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_version</span></tt></dt>
<dd>Prints information about the current versions of CVX, Matlab, and the operating system.
When submitting bug reports, please include the output of this command.</dd>
<dt><tt class="docutils literal"><span class="pre">cvx_where</span></tt></dt>
<dd>Returns the directory where CVX is installed.</dd>
<dt><tt class="docutils literal"><span class="pre">dual</span> <span class="pre">variable</span></tt>, <tt class="docutils literal"><span class="pre">dual</span> <span class="pre">variables</span></tt></dt>
<dd>Creates one or more dual variables to be connected to constraints in the current model;
see <a class="reference internal" href="basics.html#dual-variables"><em>Dual variables</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">expression</span></tt>, <tt class="docutils literal"><span class="pre">expressions</span></tt></dt>
<dd>Creates one or more expression holders; see <a class="reference internal" href="basics.html#assignment"><em>Assignment and expression holders</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">maximise</span></tt>, <tt class="docutils literal"><span class="pre">maximize</span></tt></dt>
<dd>Specifies a maximization objective; see <a class="reference internal" href="basics.html#objectives"><em>Objective functions</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">minimise</span></tt>, <tt class="docutils literal"><span class="pre">minimize</span></tt></dt>
<dd>Specifies a minimization objective; see <a class="reference internal" href="basics.html#objectives"><em>Objective functions</em></a>.</dd>
<dt><tt class="docutils literal"><span class="pre">variable</span></tt>, <tt class="docutils literal"><span class="pre">variables</span></tt></dt>
<dd>Creates one or more variables for use in the current CVX model; see <a class="reference internal" href="basics.html#variables"><em>Variables</em></a>.</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html" title="index">
<img class="logo" src="_static/cvxrlogo.png" alt="Logo"/>
</a></p><div class="sphinxlocaltoc">
<h3><a href="index.html">Page contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Reference guide</a><ul>
<li><a class="reference internal" href="#arithmetic-operators">Arithmetic operators</a></li>
<li><a class="reference internal" href="#built-in-functions">Built-in functions</a><ul>
<li><a class="reference internal" href="#linear">Linear</a></li>
<li><a class="reference internal" href="#nonlinear">Nonlinear</a></li>
</ul>
</li>
<li><a class="reference internal" href="#new-functions">New functions</a></li>
<li><a class="reference internal" href="#sets">Sets</a></li>
<li><a class="reference internal" href="#commands">Commands</a></li>
</ul>
</li>
</ul>
</div>
<div class="sphinxprev">
<h4>Previous page</h4>
<p class="topless"><a href="solver.html"
title="Previous page">&larr; Solvers</a></p>
</div>
<div class="sphinxnext">
<h4>Next page</h4>
<p class="topless"><a href="support.html"
title="Next page">&rarr; Support</a></p>
</div>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/funcref.txt"
rel="nofollow">Show Source</a></li>
</ul><h3>Other links</h3>
<ul class="this-page-menu">
<li><a href="CVX.pdf" target="_blank">Download the PDF</a></li>
<li><a href="http://cvxr.com/cvx">CVX home page</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="relbar-bottom">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="support.html" title="Support"
>next</a> &nbsp; &nbsp;</li>
<li class="right" >
<a href="solver.html" title="Solvers"
>previous</a> &nbsp; &nbsp;</li>
<li><a href="index.html">CVX Users&#39; Guide</a> &raquo;</li>
</ul>
</div>
</div>
<div class="footer">
&copy; Copyright © 2012, CVX Research, Inc..
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.1.
</div>
<!-- cloud_sptheme 1.4 -->
</body>
</html>

Event Timeline