Questions tagged [cvx]

CVX is a popular modeling framework for disciplined convex programming that CVX turns MATLAB into a modeling language, allowing constraints and objectives to be specified using standard MATLAB expression syntax.

Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

Best optimization technique for solving overdetermined systems with a constraint

I am trying to make a prediction model based on a system of linear equations: $A\vec{x}=\vec{b}$, where $\vec{x}$ ($m\times1$) is my learning parameters, $A (m\times n)$ and $\vec{b}$ $(m\times1)$ are ...
user avatar
0 votes
0 answers
49 views

Works on CVX-Matlab but not on CVXPY

I have the following program running correctly in Matlab. ...
user avatar
0 votes
0 answers
33 views

How to use decision variable in the exponential term while using CVXPY?

The objective function of my optimization problem involves the exponential function of the decision variables. My code is ...
user avatar
0 votes
0 answers
22 views

SCS deprecation warning in CVX

When using solver SCS in CVX to solve an SDP, I get the following message: ...
user avatar
  • 146
0 votes
0 answers
49 views

Formulating problem in CVX

Crossposted on Stack Overflow I am new to CVX and I have to solve the following optimization problem. I have written the code for it and also changed the equalities to make it convex but I think ...
user avatar
1 vote
0 answers
43 views

How to make this problem convex and solve it using CVX?

How to make this problem convex so that it can be solved by semidefinite programming in cvx? Given $A\in\mathbb{C}^{n\times n}$ \begin{array}{ll} \underset{X\in\mathbb{C^{n\times n}}}{\text{maximize}} ...
user avatar
  • 1,559
2 votes
0 answers
112 views

How to check the feasibility of standard LMI using Matlab/CVX?

In the wikipedia page of LMI, the standard form is given by $$A_0+y_1A_1+y_2A_2+\cdots+y_mA_m \succeq 0,$$ where $A_i$ are $m\times m$ symmetric matrices and $y_i$ are real vectors, $i=1,2,\ldots m.$ ...
user avatar
  • 1,559
0 votes
1 answer
82 views

Extracting solution of SDP problem in CVX

Assume we are given the following semidefinite program (SDP) written in MATLAB using CVX: ...
user avatar
  • 2,119
1 vote
0 answers
58 views

Finding rank of image using nuclear norm optimization with linear constraints

I'm trying to follow the theory laid out by the paper Recht, Benjamin; Fazel, Maryam; Parrilo, Pablo A., Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization to ...
user avatar
  • 1,602
2 votes
1 answer
101 views

How do I implement this convex quadratic-linear function in CVX?

From Proving that quadratic form is convex in (vector, matrix) arguments we know that $$f(Q,x) = x^T Q x$$ is a convex function jointly in $Q$ and $x$ when $Q\succeq 0$. How can I optimize with ...
user avatar
1 vote
0 answers
356 views

Radius of the largest circle in an irregular convex polygon by utilizing the Chebyshev center

I am trying to find the largest circle within the polygon with corners (0, 1), (0, 6), (4, 10), (8, 10), (11, 7), (11, 4), (7, 0), and (1, 0). So far I have drawn out this polygon and defined its ...
user avatar
  • 131
0 votes
2 answers
355 views

How to write these function with disciplined convex programming rule to use CVX? x*(2^(y/x)-1)

I have the following functions in an optimization problem. $x\times 2^{(y/x)-1}$ $ x \log (a+b\times 2^{(y/cx)-1} )$ Here, x,y>0, and also a,b,c>0, and b>a. For these conditions, I checked ...
user avatar
0 votes
1 answer
84 views

Is there any way to express one exact concave form using max, min, etc functions?

Consider the following piecewise monotonically increasing, concave, and smooth function defined over $x\in[0,\infty)$: $$ f(x) = \begin{cases} \displaystyle 2\ln\left(\frac{1}{6}x+\frac{5}{3}\right), ...
user avatar
  • 3,099
1 vote
0 answers
645 views

cvxopt: Trying to do LP and get "Terminated (singular KKT matrix)"

I am new to cvxopt and am trying to understand this fairly cryptic error message "Terminated (singular KKT matrix)." (At least critic for me.) I am solving a ...
user avatar
0 votes
0 answers
55 views

What is an easy way to use SDP solvers to generate correlation matrices that satisfy some linear constraints?

Given a correlation matrix $C_0 \in \mathcal{R}^{n \times n} $. I want to generate other correlation matrices $C \in \mathcal{R}^{n \times n} $ that satisfies some linear constraints of the form $$ ...
user avatar
0 votes
0 answers
128 views

QCQP Convex quadratic optimisation with quadratic constraint

I am trying to implement this QCQP optimisation problem in a more efficient way. The optimisation aims to smooth an existing 3D trajectory represented by "P" which contains "n" 3D coordinates. The "n"...
user avatar
2 votes
0 answers
42 views

Standardizing a convex problem

Consider the following convex optimization problem \begin{align} \max_{\mathbf{X},\mathbf{v}}~&~\mbox{trace}(\mathbf{QX}) \\s.t.&~~\mbox{diag}(\mathbf{v})-\mathbf{X}\succeq 0 \\ &~~ \...
user avatar
  • 8,408
0 votes
1 answer
253 views

Minimize Von Neumann Entropy in CVX Matlab [closed]

My optimization problem looks like: cvx_begin variable x(2, 2) semidefinite; minimize(VNE(x)) subject to trace(x) == 1 cvx_end Where, VNE or Von Neumann ...
user avatar
0 votes
0 answers
47 views

How to write this constrain in CVX

I don't know how to describe the following constrain in CVX: $$ M = bb^H $$ here $b$ is a complex column vector, and $b^H$ is the Hermitian transpose vector of $b$. Thanks!
user avatar
1 vote
1 answer
133 views

is this logdet function convex?

I have a question regarding convexity of logdet function. Given the convex set $\mathcal{C}=\{{\bf W}| w_{f,k}\in \mathbb{R}^+,\, \sum_f w_{f,k}^2\leq1\,\,\forall k\}$, is the function $I({\bf W})$ ...
user avatar
1 vote
1 answer
310 views

DCP for Product of Convex and Log-convex

Is there a way to convert a product of a convex and a log-convex function to the DCP ruleset? Specifically, I am interested in the following functions of ${\textbf{x}}$ where ${\textbf{x}}$ and ${\...
user avatar
1 vote
0 answers
481 views

Matlab cvx: Difference of convex function programming error

I am trying to do a difference of convex function (DC) programming problem in CVX for a polynomial. The objective function is convex and there is a non-convex polynomial inequality. It is known that ...
user avatar
2 votes
1 answer
1k views

Finding the maximum volume inscribed ellipsoid using CVX

I am trying to use the CVX package in Matlab to find the largest inscribed ellipsoid for a convex set of points. I was also able to get the example from this link running. [Step 1] This is how the ...
user avatar
2 votes
1 answer
273 views

Maximizing $\frac{ax}{cx+d}$ over $[0,1]$ using CVX

I have the following concave function $$f(x)=\frac{ax}{cx+d}$$ where $a, c, d > 0$ and $0 \le x \le 1$. How can I use CVX tools to maximize $f(x)$? It seems that the CVX does not support such ...
user avatar
  • 546
0 votes
1 answer
94 views

Markowitz Model Invests in Everything

I'm trying to create portfolios using real life stock market data from the past, to test real life performance of Markowitz portfolio optimization model. Solving through CVX, however, gives me the ...
user avatar
0 votes
0 answers
378 views

Convex optimization max/min with constant

I am trying to determine a battery's state of charge (SOC) $b(t)$ from generation and load curves, $g(t)$ and $l(t)$. The recursive expression for the SOC is: $b(t+1) = min[C, max(0, b(t) + g(t) - l(...
user avatar
0 votes
0 answers
39 views

convex programming

The problem is to maximize concave objective function with convex constraints: $\max \sum_{i=1}^{N} \sum_{j=1}^{M} log_2{(1+ x_{ij}c_{ij})}$ subject to $\sum_{j=1}^{M} x_{ij}g_{ij} \leq a_{i}, \...
user avatar
  • 31
3 votes
2 answers
297 views

Minimize $\|AXBd -c \|^2$, enforcing $X$ to be a diagonal block matrix

Currently, I am minimizing the quadratic objective $\|\mathbf{A}\mathbf{X}\mathbf{B}\mathbf{d} -\mathbf{c} \|^2$ using CVX, as follows ...
user avatar
  • 153
2 votes
3 answers
147 views

Optimal Distribution of Proctors

In my university, I am responsible with the distribution of proctors with respect to the student placements to the classrooms in freshman math pool courses. I faced a problem which is sticked in my ...
user avatar
1 vote
0 answers
138 views

Problem in defining weighted nuclear norm in CVX

I want to define a weighted nuclear norm, i.e., $$\|X\|_{w,*}=\sum_{i=1}^{m}{w_i\sigma_i(X)}$$ in CVX, but I can't. CVX has a function for nuclear norm called ...
user avatar
2 votes
2 answers
1k views

Maximizing a convex quadratic function in CVX and Matlab

I understand that a convex function can not be maximized as there is no such value. However, consider the following function: $$\begin{array}{ll} \text{maximize} & 3x^2 + 5y^2\\ \text{subject to} ...
user avatar
0 votes
0 answers
605 views

How to write the SDP in cvx for the following optimization problem

How to write the SDP(Semidefinite program) of the following optimization problem \begin{multline} \begin{aligned} \max_{Z,f ,g} \ && trace(KZ) − f^Td \\ \text{subject to} && trace(W^{...
user avatar
  • 137
0 votes
0 answers
343 views

How to use CVX to solve this problem?

I have a function in the variables $x_{kl};\ k,l=1\ldots,m$, $$\sum_{i=1}^n \sum_{j=1,j<j'}^{N_i}\left( b_{ij} b_{ij'}- \sum_{k,l=1}^{m}x_{kl}f_k(a_{ij})f_l(a_{ij'})\right)^2$$ where $a_{ij},b_{...
user avatar
  • 837
3 votes
1 answer
5k views

Low rank approximation using CVX toolbox in Matlab

I try to use CVX toolbox to do "low rank approximation" work. The code is as follows: ...
user avatar
  • 31
-1 votes
1 answer
2k views

Matlab Optimization Toolbox versus CVX?

I would like to know what the difference between the Matlab Optimization Toolbox and CVX, which is a convex optimization toolbox? Can a convex optimization problem be solved in both?
user avatar
  • 217
1 vote
0 answers
79 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 ...
user avatar
  • 3,802
1 vote
0 answers
909 views

Error on optimization problem, maximize log determinant on CVX

$A$ is an $N \times N$ complex matrix $W$ is an $N \times N$ complex matrix $C$ is an $N \times N$ complex diagonal matrix $u$ is a scalar $V$ is an $N \times N$ complex matrix, whose diagonal elects ...
user avatar
  • 181