Questions tagged [cvx]

CVX is a Matlab-based modeling system for convex optimization. CVX turns Matlab into a modeling language, allowing constraints and objectives to be specified using standard Matlab expression syntax.

CVX is a Matlab-based modeling system for convex optimization. CVX turns Matlab into a modeling language, allowing constraints and objectives to be specified using standard Matlab expression syntax.

99 questions
0
votes
0 answers

Find the position of min value in CVX

I am working on a code where the minimum value position is needed. I am trying to code this part inside CVX in the following form cvx_begin min_val=val(1); position=1 for i=1:r if val(i) <= min_val min_val=val(i) …
Meriame
  • 11
  • 5
0
votes
1 answer

Setting maximum number of iterations in CVX (Matlab)

How can I set (and see the default) maximum number of iteration in CVX? I want to set a smaller number of iterations to make my algorithm faster. Also is there any way I can set the convergence threshold? Any help is highly appreciated.
Erin
  • 177
  • 3
  • 14
0
votes
0 answers

Solving Least Squares with orthogonality constraint using Matlab

I need to solve the following Least Squares Problem where A and B and X are all matrices: cvx_begin quiet; variable X(len_x) nonnegative; minimize ( norm(X * A - B , 2)); subject to X >= 0; for i=1: size(X,2) for j= i + 1: size(X,2) …
Erin
  • 177
  • 3
  • 14
0
votes
1 answer

Entropy maximization unbounded/infeasible using CVXPY

I am attempting to solve an entropy maximization problem numerically using CVXPY. Even though the problem passes the DCP checks, I keep getting an infinite result, and problem statuses like infeasible and unbounded_inaccurate (depending on the…
ErnChe
  • 1
  • 3
0
votes
1 answer

Fast CVX solvers in Matlab

I am wondering what is the fastest convex optimizer in Matlab or is there any way to speed up current solvers? I'm using CVX, but it's taking forever to solve the optimization problem I have. The optimization I have is to solve minimize norm(Ax-b,…
Erin
  • 177
  • 3
  • 14
0
votes
2 answers

Running CVX in parallel in Matlab

I am running CVX with different parameters in parallel. When running in serial, I do not get any warning, but running in parallel (with parfor), I get the following: In cvx/bcompress (line 2) In cvxprob/newcnstr (line 233) In cvxprob/newcnstr…
Erin
  • 177
  • 3
  • 14
0
votes
1 answer

Frobenius norm minimization using MATLAB and CVX

I have a SVM problem of the form: minimize ||Q||_F subject to l_i (x_i^T Q x_i) >= 1 where Q is a square matrix, the x_i's are the training examples and the l_i's are the labels for the training examples. Is there a way to solve this using existing…
BMillikan
  • 21
  • 2
0
votes
1 answer

l1 magic error - matlab

I am trying to reconstruct the image using fewer observations than the dimensions of the signal(compressed sensing). I am trying to run the following piece of code - A = imread('cameraman.png'); x_i = 37; y_i = 95; s = 35; A =…
pyronic
  • 372
  • 6
  • 16
0
votes
1 answer

How to pass MATLAB syms/symbolics to cvx sdp solver?

I have a 3D matrix At, n x n x nvar, and nvar variables y1...y25. I was easily able to feed the variables into cvx: cvx_begin sdp; variable A(2*nbus,2*nbus) symmetric; variable y(1,nvar); maximize sum(y*Mfun); A == …
LShaver
  • 285
  • 1
  • 5
  • 14
0
votes
1 answer

Error about CVX optimization

I am trying to use the cvx model to solve an optimization problem; here is my code: cvx_begin variable R(total_v,2) for eth=1:total_e i=1; for vth=1:total_v for lth=1:2 …
0
votes
1 answer

Convert a semidefinite program from CVX to CVXPY

I want to convert the following SDP — which just verifies the feasibility of the constraints — from CVX (MATLAB) to CVXPY (Python): Ah = [1.0058, -0.0058; 1, 0]; Bh = [-1; 0]; Ch = [1.0058, -0.0058; -0.9829, 0.0056]; Dh = [-1; 1]; M = [0, 1;1,…
Huayu Zhang
  • 207
  • 4
  • 11
0
votes
0 answers

Concave to convex- shortest way from point to circle

I have the optimization problem. I need to find the shortest way from point inside the circle to circle's perimeter. The function of constrains is concave. To make it works, I need to change this concave function to convex. I looked for "Poles of…
kubauser
  • 21
  • 4
0
votes
0 answers

Matlab: cvx convex programming error

I am new to cvx and get an error in solving the following convex problem: In the above formulation, L=|E|, 'p' and 'm' are given positive real indices. Here is my code: cvx_begin variable x(L,L); …
fhm
  • 57
  • 1
  • 11
0
votes
0 answers

Error using cvx/mtimes (line 41) Inner matrix dimensions must agree. Error in cvx/mrdivide (line 15) z = mtimes( x, y, 'rdivide' );

I am trying to solve a geometric programming problem with cvx package in Matlab. Objective function is maximization, but inside it, I have to define a min function. When I try to run the code, I got this error Error using cvx/mtimes (line 41) …
S Kh
  • 105
  • 2
  • 9
0
votes
0 answers

CVX program for the matrix variable optimization

This question is about solving the problem on CVX using MATLAB: My variable is W which is a N X N matrix. a is n X 1 vector. Sigma is a PSD matrix. a) Can I solve this problem in Disciplined manner? b) How to reformulate this in cvx since CVX says…
Ashutosh Gupta
  • 670
  • 7
  • 15