Questions tagged [cvx]
a MATLAB-based modeling framework for convex optimization.
30
questions
8
votes
5
answers
4k
views
Minimizing $\mathrm{trace}(S)+\mathrm{trace}(S^{-2})$ using CVX
In Matlab, I would like to minimize the function
$$f(S)=\mathrm{trace}(S)+\mathrm{trace}(S^{-2})$$
where $S \in \mathcal{M}_{m,m}$ is symmetric and positive definite, which is definitely a convex ...
5
votes
1
answer
826
views
Semidefinite Programming Using CVX in Matlab
I have the following optimization problem
$$\begin{align}
&\min_{ X_{1}, \dots,X_{k} } \max_{ \theta, \phi } \left|P_{d}(\theta,\phi) - \sum_{k=1}^K \operatorname{Tr}(a_{k}(\theta,\phi)a_{k}^{H}...
4
votes
2
answers
7k
views
how can a 2-d fft be constructed to an equivalent matrix?
When I use the cvx matlab toolbox, I met a puzzled problem. The function of fft (or dct, wavelet, etc.) cannot be recognized by the type of 'cvx'. For the 1-d fft, it can be constructed to an ...
4
votes
1
answer
170
views
How to form the following constraint in cvx?
The optimization problem is
$$\min_{x\in K} \|h - x\|_2$$
where
$$K = \{v\in R^n : \exists \lambda \geq 0\ v_1=v_2=\ldots=v_k=\lambda \ \text{and} \ |v_i| \leq \lambda \ \text{for} \ i=k+1,\ldots,n \...
3
votes
2
answers
1k
views
Finding A and X such that AX = 0, X is positive non-zero, and A is sparse
I apologize if this is a naive question. I'm trying to create some boostrap data for a system of linear, ordinary differential equations at steady state.
Since the equations represent the ...
3
votes
1
answer
2k
views
How can I minimize the number of non-zero elements in the solution vector subject to linear constraints (MATLAB)?
all, I've tried to find an answer to this question and have come across some related threads but nothing I was able to apply to my problem given my relative lack of experience in this arena.
I ...
3
votes
1
answer
115
views
Find $x$ that satisfy $(I-A^*A)+x(\frac{A+A^*}{2})\prec0$ using LMI or SDP on Matlab
Given $A\in\mathbb{C}^{n\times n}$, I want to use LMI or SDP to find feasibility of $x>0$ in the following inequality:
$$(I-A^*A)+x(\frac{A+A^*}{2})\prec0,$$
where $D\prec0$ means that $D$ is ...
2
votes
1
answer
86
views
Convex optimization: what is atom library?
By reading the CVX users' guide, I frequently came across with the term "atom library", which I suppose to be a set of functions that one must use to construct mathematical expressions on ...
2
votes
1
answer
110
views
A concave maximization that is not supported on CVX
I try to solve a maximization problem using CVX. In its simplest form, I want to maximize
$$f(x,y)=y*h_b\left(\frac{x}{y}\right),$$
where $h_b(\cdot)$ is the binary entropy function. In the context ...
2
votes
1
answer
4k
views
Disciplined convex programming error: Only scalar quadratic forms can be specified in MATLAB's CVX
I want to minimize
$$W\, \text{tr}\left([A-Y_{pie}][A-Y_{pie}]^T\right) + \lambda\Vert A\Vert\, \enspace ,$$
however, I encounter the following problem:
...
2
votes
1
answer
178
views
Could the convex problem be tackled by CVX?
I want to solve the convex optimization as follows:
\begin{align}
\underset{X_1,X_2}{\min} &\ -\frac{1}{N}\sum_{i=1}^N\log\det\left(I+H_i^HX_2H_i\right)-\log\left[1+h^H(X_1+X_2)h\right]\\
&\...
1
vote
1
answer
2k
views
Matrix transpose multiplication
In CVX, I encounter a problem. I want to multiply a Matrix of 2x4 with its transpose. I know the result must be positive definite. However, it couldn't let me do the multiplication directly. Says: ...
1
vote
1
answer
525
views
How to deal with quadratic constrain in semidefinite programming
I am using CVX to solve an optimization problem. One of my constraints in the problem is
$$M \succeq \eta {\eta}^T$$
where $M$ is a square matrix and $\eta$ is a column vector (both $M$ and $\eta$ ...
1
vote
2
answers
622
views
How to represent weighted nuclear norm of matrix variable X and minimize it by CVX function, or solve it by other possible packages
I want to minimize $f(x) = \mathrm{Tr}(\sqrt{\mathbf{X}^{T}\mathbf{X}}\mathbf{A})$, where $\mathbf{X}$ is an matrix variable of dimension $d \times d$, and $\mathbf{A}$ is a known matrix. I tried the ...
1
vote
2
answers
488
views
How to nest 2 simple CVX problems? Is it possible at all?
I have the underdetermined outer optimization problem
$$\text{min}_{x\geq 0}\quad \|Ax-b_1\|_2^2+\|AT(x)-b_2\|_2^2$$
with $A\in\mathbb{R}^{m\times n}$ and $m<<n=64^2$ or in corresponding CVX ...
1
vote
0
answers
272
views
Problem in parameterizing a CVXPY program
I am trying to parameterize a CVXPY program as I need to repeatedly solve the problem, but I noticed that when my parameters are complex numbers, CVXPY models the problem in each iteration. For ...
1
vote
0
answers
397
views
Why is the problem infeasible?
Given $\mathbf V_t=\mathbf v_t\mathbf v_t^H$ where $\mathbf v_t=\left(e^{j\theta_{1}},e^{j\theta_{2}}\right)^H$:
\begin{equation*}
\begin{array}{ll}
\underset{\mathbf V}{\operatorname{minimize}} & ...
1
vote
0
answers
97
views
Best optimizer for unconnstrained non-convex nonlinear least-square optimization problem?
I am looking for a very good optimizer to the following problem:
$$\min_{P,\Theta}\lVert APD(\Theta)P^{-1} -B \rVert_F$$
where $A,B \in \mathbb{R}^{n\times m}$, $P \in \mathbb{R}^{m\times m}$, $D\in \...
1
vote
0
answers
163
views
Coding a convex problem in CVX
I am new to CVX and am trying to simulate this convex problem I found in a paper.
$$\min_{\gamma,\mathbf{mu},\mathbf{G},\mathbf{\Omega},t} \text{Tr}(\mathbf{G}\mathbf{C}\mathbf{G}^H)+t \\ s.t. -t-\...
1
vote
0
answers
86
views
Issues with CVX package for optimization
I am trying to use the cvx package for optimization. However, I am having some issues with it. I have a variable X which is a matrix but I cannot add $X^{-1}$ in the objective function. What should I ...
1
vote
0
answers
231
views
Sign or cardinality constraint when solving for sparse signal
I'm currently learning about using linear and semidefinite programming to find sparse solutions to problems. In particular, finding sparse solutions where the sampling functions are sinusoidal (...
0
votes
1
answer
3k
views
How do I correctly multiply vectors and matrices in Python and MATLAB?
I have been trying for 2-3 days now to get L2 regularized logistric regression to work in Matlab (CVX) and Python(CVXPY) but no success. I am fairly new to convex optimization so I am quite frustrated....
0
votes
3
answers
679
views
Solving rank deficient systems with cvx
I am using cvx to solve linear programs with constraints of the form $Ax=b,x\ge0$. However the matrix $A$ is rank deficient and cvx returns a warning and finally displays status as 'Infeasible'. Rank ...
0
votes
1
answer
94
views
Formulate and solve a simple conic programs in cvxpy language [closed]
Let $r,\epsilon > 0$ and $a, b \in \mathbb R^n$ with $\|a\|_2 \le r$. Define $C(a) := \{x \in \mathbb R^p | \|x+a\|_2 \le r,\;\|x\|_\infty \le \epsilon\}$, and assume it is non-empty.
Question
(A)...
0
votes
1
answer
1k
views
Positive definite matrix in CVX
I'm trying to use CVX to solve SDP problem.
I have a constraint with positive definite matrix, but if i read the document of CVX, I can only find variable with positive semidefinite matrix.
Can anyone ...
0
votes
1
answer
207
views
CVX : Obtaining the minimizing parameter at the optimum
In CVX, how do we return the value of the parameter over which the problem is minimized at the optimal value?
By this, I mean, how do we obtain
$$x^* = \arg\min_x f(x)$$ when solving the problem ...
0
votes
1
answer
428
views
Custom CVX Functions - Overriding Errors [closed]
I have constructed a function in Matlab that is convex and increasing (qualitatively similar to an exponential function but I am hoping to avoid the successive approximation requirement of exp). In my ...
0
votes
1
answer
429
views
Why is a elementwise max not DCP?
I am trying to formulate a convex optimization problem using CVXPY. Everything works, except a constraint that does not seem to follow DCP rules.
Let $D \in \Bbb R^n$ be a decision variable and let $Q$...
0
votes
0
answers
207
views
Absolute value constraint in quadratic programming optimization
$$
argmin(x,y)=x^2+y^2+2y
$$
$$
s.t.\ \ y=|x-10|
$$
How can I convert the absolute value constraint to the constraint matrix (GX<=h, AX=b) in cvxopt?
0
votes
0
answers
144
views
CVXOPT intermediate step valuation stepping out of function domain of defintion
I am using CVXOPT, particularly to solve a nonlinear convex optimization problem. Either the objective function or the constraints involve some functions that are only defined in a strict subset of $\...