Why isn't CVX accepting my model? READ THIS FIRST!

If you are here because CVX is rejecting your model, or if you do not know if CVX will accept your model, please read this page before posting a question. Many of the questions posed in this forum are addressed fully by the general answers given here.

I know CVX looks easy to use—we designed it that way—but when used improperly, it’s surprisingly frustrating. So it is extremely important that users understand CVX’s inherent requirements and limitations to avoid wasting time.

In short: using CVX incorrectly is actually worse (for you!) than not using it at all.

The first thing we must ask you is this:

Is your model convex?

No, my model is not convex.

You should not be trying to use CVX. CVX is not a general purpose optimization framework. It is designed specifically for certain kinds of convex optimization problems, as well as certain mixed-integer convex models and geometric programs. If you do not already know that your problem fits into one of CVX’s supported problem classes, then CVX is not the correct tool to use.

I do not know if my model is convex.

Then the answer is the same as above: You should not be using CVX. Save yourself considerable frustration and stop now. CVX is a framework for disciplined convex programming. What that means is that you have to know in advance that your model is convex, and you have to be able to prove that fact by building your model according to a specific set of rules.

CVX is not particularly useful as a convexity verification system. That is, if you do not know that your model is convex, don’t just enter it into CVX “to see what happens”. You really do need to do the advance work yourself.

Yes, I have proved that my model is convex!

Are you sure? Have you rigorously proven that it is convex? Unfortunately, it is very common for people to ask why CVX cannot solve their convex model, only to discover that their model is not actually convex. For example, ratios f(x)/g(x) of affine or convex/concave expressions are almost never convex, and yet countless people have come to this forum and others claiming that they are.

Do not trust your intuition alone on convexity. Prove it. In fact, in order to use CVX, for reasons we explain below, CVX only accepts models that can be proven convex using only the rules in CVX’s DCP ruleset. If you have not yet done that, go do that now and come back to this FAQ.

The paper where I found the model says it is convex.

This is not sufficient. Please do not use CVX until you have thoroughly proven that the model is a convex optimization problem.

It does happen, sometimes, that authors are incorrect. But more commonly, they are imprecise. That is: some models that are claimed to be convex are convex geometrically, but they are not in a standard convex optimization form. For a simple, but contrived example, consider the constraint \lceil x \rceil \geq 1 is not a valid constraint in a convex optimization setting, even though it describes the same interval as the linear inequality x>0. (I’ve not seen this particular example in practice, but I have seen others; e.g., beamforming papers.)

If you are having difficulty proving that a model you found in a paper is convex, please contact the authors to see if you can get clarification. In fact, if they say they’ve solved the problem with CVX themselves, ask them for the code! But please do not try to use CVX until you’ve done so. And please do not ask for help with this here at this forum.

Yes, I am sure my model is convex!

Wonderful. Well done. (I know there’s a “but” coming, though…) What error message did you get?

Matlab returned this error: Function “so-and-so” undefined for objects of type “cvx”.

This is because you’ve tried to use a function that is not on CVX’s list of supported functions. If you cannot express your model in terms of these functions, CVX cannot handle it. It is not straightforward to add new functions to CVX, due to the unique way that it operates; more on this below.

Matlab gave me a “Disciplined convex programming error”.

It is definitely possible to construct convex expressions that violate the DCP ruleset. For instance, consider sqrt(sum(square(x)). This is just a representation of the convex Euclidean norm, but CVX rejects this expression as a violation of the rules. Fortunately, you can just use norm(x) in that case instead.

Similarly, if you want CVX to solve your model, you must find a way to express it in a manner that complies with the DCP ruleset.

But I can’t use the DCP rules alone to prove it; I had to use other principles, like a derivative test or a secant test, as well.

Unfortunately, if you cannot rewrite your model to avoid a DCP error, that means that CVX cannot solve your model. We do not claim that CVX can solve every convex model, and we do not consider this a bug.

Can’t I just tell CVX somehow that my model is convex?

No, you can’t. To understand why, you must understand that the DCP ruleset is not for your benefit. Yes, we want you to be able to prove that your model is convex, and the rules can certainly help. But in fact, the rules are needed by CVX. The real purpose of the rules is that CVX relies upon them to convert problems to a solvable form.

Each individual rule corresponds to a specific step in the process of converting your model into the so-called conic form demanded by SeDuMi, SDPT3, etc. In mathematical terms, each rule corresponds to a specific equivalency- and convexity-preserving transformation. This conversion process is by no means straightforward, as you know if you have tried to do it by hand. We’ve accumulated a library of these transformations in CVX in order to automate that process for you—and each of those steps is tied to one of the DCP rules.

So whether you realize it or not, by ensuring sure that your model is expressed according to the rules, you are giving CVX not just a proof of convexity, but also a recipe for solving your problem. If your model violates the rules, then CVX is unable to construct the necessary transformation. If you want a more technical explanation, please read the papers listed here.

Can I add my convex/concave function to the CVX function library?

Possibly, but it’s not straightforward. We have documented the approach in the advanced section of the users’ guide, Keep in mind that this involves building up a description of the function using the existing set of DCP rules. Unless you are an advanced CVX user, I would not recommend trying this.

Unfortunately, some of CVX’s limitations are dictated by the specific solvers that it targets (SeDuMi, SDPT3, Gurobi, MOSEK, etc.). Even if you were try and bypass CVX completely, you would still find that many problems cannot be handled by these solvers. However, if you have studied up on how CVX represents functions, and you think that there’s a good chance that your function should be compatible with these solvers, go ahead and post it here on the forum!

But my function is smooth. Other modeling systems just let me provide code to compute the function and its derivatives. Why can’t I do that with CVX?

This makes perfect sense for traditional smooth NLP solvers. But in fact, CVX does not consider function derivatives at all. The solvers do not either: they are conic solvers which rely not on functions but on convex cones to describe constraints. CVX uses an entirely different way of describing functions to these conic solvers than the traditional value/derivative-based approach found in a traditional modeling system like AMPL or GAMS. For more information, you’ll need to read one of these papers.

OK, OK, I give! I accept that CVX cannot actually solve my model. But what can I do?

Well, if your model is smooth, a traditional NLP solver, coupled with a traditional modeling framework like AMPL or GAMS, may be useful. YALMIP is a modeling framework in MATLAB that supports both convex and non-convex problems, and it connects to a wider variety of solvers than CVX. So that might be worth a try if you want to stay in MATLAB. And of course, MATLAB has an optimization toolbox of its own. Unfortunately, I do not use any of these tools regularly, so I cannot offer more specific advice.

8 Likes
Cannot perform the operation: {real affine} .* {convex}”
Cannot perform the operation: {real affine} ./ {real affine}?!
log_sum_exp( {mixed concave/constant} )
Solving an SDP optimization problem
Disciplined convex programming error: Invalid constraint: {convex} <= {convex}
CVX error, Invalid constraint: {concave} == {real affine}
DCP Programming error: {convex} .* {convex}
Invalid quadratic form(s): not a square (multiplication variables)
Cannot perform the operation {convex}*{convex}
Illegal operation: - {log-concave}
Cannot perform the operation: {concave} ./ {real affine}
Cannot maximize a(n) log-convex expression error!
Newcnstr( evalin( 'caller', 'cvx_problem', '[]' ), x, y, '>=' );
Invalid constraint problem
How to achieve myself function?
Problem:Only scalar quadratic forms can be specified in CVX
Quadratic constraint
Invalid constraint: {concave} == {real affine}
Finding global extrema of polynomials
DCP error/ Expreesion in objective function must be real
Nonconvex constraint
Eigenvalues in CVX
Please help for the Invalid constraint
Error using cvx/times (line 262) Disciplined convex programming error: Invalid quadratic form(s): not a square
Disciplined convex programming error:Invalid computation: prod( {convex} )
SOCP with quadratic inequality constraints
How to deal with $\ell_1$ norm equality constraint?
Formulate problem in CVX and using subgradient algorithm
Is the following function convex?
Is the following function convex?
Error in problem forumlation
Logical constraint problem
Matrix Multiplication
Convert to DCP a product of two increasing convex functions
Pardon our dust!
How to solve the following problem with CVX?
Quad_form for convex problem (Moderator note: quad_form is convex, but this problem is not)
Is it possible to solve for objective function with x.*exp(x+y)+y.*exp(x+y)
How to write this constraint in cvx?
How to make the formulation consistent with the DCP ruleset?
Illegal operation: {log-affine} + {concave}
Quadratic programming: product is complex!
Cone programming (xy<=z^2)
How to write this with CVX code
X/(x+1)^2 convex for x>=2
Ask for help to solve the problem
How to present my convex optimization in a CVX-compliant way
Can this OP be solved in CVX?
How can I perform {convex}^2? (Moderator note: {convex}^2 is convex, but the problem contained herein is not)
How to express (1-2*z)*log(1+y*theta2/(1-2*z)) into CVX form?
How to solve or avoid the problem of “{log-affine} .* {concave}”?
Only scalay quadratic forms can be specified in cvs on multiplication of 3 term can i know why is it so?
How can I minimize the following term taking alpha and beta as variables
How can formulate difference between to variable
How can I solve this error in order to implement the CVX toolbox?about zGz type
Problems with the pow_p and a convex input x - need help for alternative representation
Curve fitting with two exponential functions
Undefined function 'find' for input arguments of type 'cvxcnst'
If-else constraints in CVX
How to use "external" MATLAB functions in CVX?
How to do matrix inverse in CVX
Error using cvx/times: Invalid quadratic form(s): not a square
How to describe the constraints for all values ​​in the domain?
What can I do about the Disciplined convex programming error?
How to add the constraints $trace(power(z,2))==1$ in cvx sdp problem, where z is a matrix?
How to determine whether a function is convex
New to CVX and MatLab
Disciplined convex programming error: Invalid operation: * {positive concave matrix}
The following cvx variable(s) have been cleared or overwritten: x_u y_u
Simulated annealing with equality constrainsts
Quadratic constraint of a matrix is not allowed in cvx?
Can CVX toolbox solve all convex optimization problems?
What type of numerator and denominator should be to let cvx accept?both convex?
Is it possible to use sin or cos in cvx?
How to write sum(exp(-x))
DCP problem: Cannot perform the operation: {real affine} ./ {real affine}
Cannot perform the operation: {positive constant} ./ {convex}
A question about equal constraint in GP
Disciplined convex programming error:{concave} == {constant}
Invalid constraint: {convex} == {real constant}
Please help me to fix the problem
Solve problem with cvx
Use cvx to check a function is convex or not
Finding an optimum value of $x$ using CVX
I am a beginner for CVX and I am trying to solve the below problems, however, I get a wrong message of " Cannot perform the operation norm( {mixed convex/constant}, 2 ),出错 UAV (第 196 行) s1_2=norm([1,x])-x;"
Error in performing integration
How can I express the following formula?
How can cvx solve function like exp(x)*(exp(exp(-x))-1)?
Invalid operation: {positive convex} - {positive convex}
How can I solve this problem with CVX
How to solve : Cannot perform the operation: {convex} .* {real affine}
How do I use my own function in CVX model
Is it a convex problem? Could it be solved by cvx?
The constraint is the sum of infinite terms, and the sum of infinite terms contains optimization variables
Cannot perform the operation: constant complex affine .* convex
How to divide real affine matrix by real affine scalar?
Constraint:a*log(1+1/b)>k
Maximizing polynomial
Formulate a non-convex objective function
DCP error: Only scalar quadratic forms can be specified in CVX
Problem: Invalid quadratic form(s): not a square
How to deal with this convex problem by cvx
Need Cholesky Factorisation of Variables
Why the cvx doesn’t want to accept (1-xa)/xa?it is convex!
Turning concave log(1+ax+y) function to convex function
How to express this normalized square objective function?
Why Cannot perform the operation: {real affine} ./ {real affine}
The second argument must be positive or negative semidefinite for convex objective function
Constraint on the product of two variable matrices
"Invalid quadratic form(s): not a square" AND "Error in '*' z = feval( oper, x, y )"
How to solve minimization problem with unconvex constrains as follows with cvx
Infinity norm minimization
Error in constraint
Disciplined convex programming error: Invalid operation: * {positive concave matrix}
HELP! I need a help!
Modeling a power cone
How to express -x^(-2)*log(x)
How to express ||E||2
Multiple Variables in Objective Function
Can anyone help me on this constraint? Many thanks!
How to use cvx when it has auxiliary variable
How can I solve maximum probability program?
Disciplined convex programming error: Illegal operation: {convex} - {convex} 出错 - (第 21 行) z = plus( x, y, true, cheat );
Multiply two variables
Invalid quadratic form(s): not a square error
Product of complex vectors and matrices
When solving a resource optimization problem, I encountered a constraint that I felt was non concave relative to the variable I needed to optimize. Is there any method to convert this constraint into a concave constraint?
Some questions about kron in CVX?
How to implement following objective function by using cvx?
Question on Rank Constraint
How to write following objective in matlab using CVX?
Maximizing polynomial
Time delay of estimation
How to write this objective function attached?
Time delay of estimation
"Error using cvx / prod (line 84) Disciplined convex programming error: Invalid computation: prod ({convex}) "
Minimization of losses of dc-dc boost converter
Minimization of losses of dc-dc boost converter
Cannot perform the operation: {real affine} ./ {real affine}?!
Problem with nonlinear lmi in cvx
Disciplined convex programming error: Invalid constraint: {convex} <= {convex}
Problem in cvx with log2 function?
How can calculation this problem
Why do I have so many variables and constraints, even if I write nothing after "subject to"?
Is convex or not convex problem?
Require some help in solving an optimization plb
Can we minimize a scalar like x'Ay?
Log( {positive convex} )
How to express exp(x).*log(1+exp(y).*inv_pos(z))?
How can i solve this problem by CVX?
CVX Diciplined errot
CVX Diciplined errot
How to solve this LMI
Illegal operation: {invalid} + {mixed real affine/constant}
How to solve this optimization problem? Thanks!
How to write this fomula into CVX expression?
CVX error in using inv_pos
Need help to reformulate Projectile Motion to a convex problem
Newer for cvx,looking for help
Disciplined convex programming error: Cannot perform the operation: {real affine} .* {convex}
Disciplined convex programming error: Cannot perform the operation: {real affine} .* {convex}
DCP convex programming error: Only scalar quadratic forms can be specified in CVX
DCP convex programming error: Only scalar quadratic forms can be specified in CVX
How do I change these 2 equations to ensure the problem is convex and fits into CVX
How to write subject : t*lnt/(1-t)-ln(0.1)<0 with t>1 in cvx forms
How can I write this kind of constraint (cube over square) in cvx
Issue with Norm and log constraint
Optimization involving the inverse of an SDP matrix
How to express the following function in cvx
First kind of fredholm equation Ax=b than
How to express "t*e^(x/t)-t" in CVX?
Cannot perform the operation: {real affine} ./ {real affine}
How solve this optimization problem using cvx solve?
How solve this optimization problem using cvx solve?
Log operation with "Error: Invalid quadratic form(s): not a square"
Disciplined convex programming error: Illegal operation: {convex} + {concave}
Why can't the code run if i just modify some variable and formula?
Why can't the code run if i just modify some variable and formula?
How to make square(sqrt(x)) feasible?
Invalid quadratic form (Matrix multiplications)
Minimization of objective function with three terms?
Problem in formulating my problem in CVX
Vector optimization in CVX Matlab
How to solve ''Unable to perform assignment because value of type 'cvx' is not convertible to 'double'
Why do i just mutiply two scalar,but the window show me i need a square ,and error using in .*?
Illegal operation: pow_p( {convex}, {0.00015758} )
How to use log_sum_exp
Please help me with Illegal operation: log( {complex affine} )
Can CVX solve this optimization problem?Can you help me?
Cannot norm( {convex}, 1 )
Error with the following optimization
Conversion of "sine function to convex form
Error using cvx/log Disciplined convex programming error: Illegal operation: log( {convex} )
Min_x abs( f(x)) using cvx
[urgent] Illegal operation: rel_entr( {convex}, {convex} )
Cannot perform the operation: {concave} ./ {convex}
How to express accumulation expression in CVX
General quad over lin
How is possible to implement eig(X) with matlab cvx?
UAV Positioning_ Restricted Zone
I am not able to solve this
How to deal with a complex matrix in cvx
Nonlinear problem
Conic reformulation of nonlinear terms in Mosek
Cannot {positive constant} ./ {convex}
Another form to formulate this restriction
Error when using inequality constraints
Min abs of a convex fun
Help! How to express this in cvx?
Why the complexity is so high
How should I represent expressions in the picture in CVX?
Disciplined convex programming error: Cannot perform the operation: {complex affine} .* {log-affine}
Error debugging formula in maximize
Log(1+x^1.5) in cvx
How can I transform my objective function to a convex optimization problem
CVXPY: how to use "log"
Max_{w} \log(|h^Hw|^2) is a concave function
Error using sqrtm Input must be a single or double matrix
Log{convex error}
Hello, could you tell me how to solve this function with cvx.
How to solve the min quadratic programming problem
The second argument must be concave
Writing pow(a,x) in cvx when x is variable and a
How to write expression x / (ln(1+x)*log(1+x)*log(1+x))
How to solve {positive constant}/ {complex affine}
How to solve error ‘Illegal operation: pow_p( {convex}, {-1} )’
Unable to solve Convex programming problem
A question about Convex feasibility problem
Error : Invalid constraint: {convex} <= {convex}
Error using cvx/sqrt (line 61) Disciplined convex programming error: Illegal operation: sqrt( {convex} )
How to solve the problem: {convex} .* {convex}
{concave} - {concave}
Square() and pow_pos()
How to frame the following problem in CVX tool set?
A complex channel model
How to write f(x,y1,y2,p,q) = x^4 / ((y1 + y2) * p * log(1+q)) in CVX
How to explain or understand ''a function's infinity norm''
Can CVX solve first order derivatives for extreme values?
How to realize the trace(A*X*X^h*B^h) in CVX?
What the result of a Graduated non-convexity function,as you can see,the problem is non convex when B is large ,but cvx still can give me the result,can i believe it
^_^ Cannot perform the operation: {complex affine} .* {convex}
Ask for help about cvx
How can I slove this problem? Disciplined convex programming error: Cannot perform the operation: {real affine} ./ {real affine}
Disciplined convex programming error! So, how to solve this problem in CVX?
How can I express this constraint in CVX
How can i fix this error
How to solve the optimization problem?
I want to know where my problem is?
Disciplined convex programming error: Cannot perform the operation: {convex} ./ {convex}
Cannot perform the operation norm( {mixed concave/constant}, 2 )
Cannot perform the operation: {log-affine} .* {complex affine}
Greater than equal restriction on CVX
How can I express this concave function in CVX
I want to solve the SDP problem with cvx, and I want to know how to express the objective function so that it conforms to the cvx specification
How to type the w'R/(w'Vw) >= m with CVX?
Scalar quadratic forms can be specified in CVX
Invalid constraint: {convex} >= {convex}
Error using .* (line 173) Disciplined convex programming error: Cannot perform the operation: {real affine} .* {convex}
Cannot perform the operation: {concave} .* {complex affine}
Disciplined convex programming error: Illegal operation: {convex} - {convex}
How can I solve the problem with CVX?
I’d like to ask everyone: what should I do if the optimization variable is embedded in a very complex objective function?
Help, help! Disciplined convex programming error: Cannot perform the operation:Cannot perform the operation: {real affine} .* {convex}
Inclusion of Expressions Causes Infeasibility
How to multiply two variables in CVX?
Simple disciplined convex programming error
Error on quadratic form
How do I express X=x*x‘
Fractional program
How to solve this error: Cannot perform the operation: {convex} ./ {convex}
Can CVX handle jointly convex functions?
How do I invert a matrix with a cvx variable if I can't use the pinv function?
How can solve this Quadratic Assignment Interger Programming Problem by CVX
CVX solver maximizing with respect to Rx
When using CVX to solve this problem, an error occurs afterwards
Is it possible to formulate a convex expression to minimize the difference between the Frobenious norm of a positive semidefinite matrix and a real positive value?
How to convert sqrt( 1-(1+x/y)^(-2) ) to a formula that can be expressed in CVX?
How to write the objective function in Matlab?
{convex} .* {convex}
Write 2*x/y in cvx
Problem about rel_entr
How to formulate the target function that cvx can solve
Disciplined convex programming error: Invalid constraint: {real affine} >= {concave}
How can I convert x*log(u(x)) into a concave function, given u(x) is concave w.r.t. x?
Please help me to solve {convex}
The target function is ln, there's an error on this line
Help!How to express the multiplication of two variables in CVX?
How to deal with the product of column vector and its conjugate transpose?
How to solve minimize sum_k 1norm(x-x_k)^2 * norm(y-y_k)^2, where x,y,x_k,y_k are vectors with the same length, can we use CVX to solve this problem, thank you
How to set a constraint that the variable's first column is the minimum value in the remaining columns
Ask for help about cvx!
How to convex of this objective function
Please help me how to define the upper bound of variable in CVX
How to deal with the product of column vector and its conjugate transpose?
How to express the function of f(x) = log(1+1/(norm(x-a)^4 ) ) in cvx, where x is a vector variable
How the xcorr function is used in CVX
Square_pos not is a suqare
Modeling a non-convex SDP
trace(hk(:,a)*hk(:,a)'*w*w')How should the traces of this matrix be represented in CVX?
Exponential of variables in the objective function
Is there a way to reformulate 1/(v1*v2) so it can be maximized?
The second argument must be concave
Disciplined convex programming error: Cannot perform the operation: {real affine} ./ {convex}
How to solve this problem: {convex} .* {convex},
How to fix "Cannot perform the operation: {real affine} .* {convex}"?
How can I solve this problem?( {real constant} <= {convex})
How to deal with {complex affine} ./ {real affine}
For help! Cannot perform the operation:{convex}.*{concave}
Can anyone tell me is there an exsiting solution to this simple problem?
Help:Cannot perform the operation: {real affine} ./ {real affine}
CVX problem processing in 3D reconstruction
The following cvx variable(s) have been cleared or overwritten: C2
The solution of cvx
There was an error when I asked for rk at the end, can you help me! Error message Disciplined convex programming error: Illegal operation: log( {convex} )
Disciplined convex programming error: Cannot maximize a(n) convex expression
How to express this on CVX
Ask for help: The expression trace(H_e1 * W1) results in a "not a square" error because H_e1 is a constant square matrix, while W1 is a variable matrix
This constraint is non-convex in CVX. Could you please tell me how to transform it into a convex one?
Disciplined convex programming error: Cannot perform the operation: {convex} .* {convex}
How to transfrom this robust constraint to a LMI via generalized S-produce?
How are trigonometric functions handled in CVX?
How to write the SINR constraint in CVX
The function 'cos' is not defined for an input of type 'cvx'.how can I fix it?
Why can't CVX solve my problem and I am getting this error?
How to express tau*W*log2(1+(theta*h)/(tau*sigma))==S in CVX?
“Disciplined convex programming error: Illegal operation: exp( {affine} ).”how can I fix it?
Cvx form for R=a(log2(1+b*c/a*d))?
Help! how to express b*log(1+K*a/(b))
inv_pos(A)+inv_pos(B) (moderator note: the expression in the title is convex, but the problem in the question is not)
Can cvx solve quadratic programming problems? (Moderator note: this particular quadratic programming problem is non-convex)
Angle of Elevation in Pathloss
Laser shift problem
How to resolve this code error?( Invalid constraint: {convex} >= {real constant})
The L2 norm of a complex vector in cvx
How to handle trace with CVX? Error: Only scalar quadratic forms can be specified in CVX
How to use sqrtm function in cvx?
Please help me in this context
How to express trace(AX((A)^H)X) in cvx?
How to write this objective function attached?
Cannot perform the operation: {convex} ./ {convex}
Convexity or not?
Convexity or not?
Log( {complex affine} )
Acceptable model specification
How to deal with this problem including indefinite matrix ?
The problem CVX solved is certainly a convex problem?
The inv() in CVX
Log( {convex} in cvx
Dealing with matrix multiplication
Matlab问题,关于仿射函数乘以一个凸函数不符合cvx规则
How to express (x^2)*log(2+y)
{concave} .* {concave}
Trace ratio Maximization involving Complex matrices
How to write this with CVX code
Cannot perform the operation: {complex affine} .* {convex}?
Unitary matrix constraint cvx matlab
How to express 1-F(x) using log_normcdf?
Error: {positive constant} ./ {convex}
Error : Invalid operation: {6e+06} ./ {real affine}
How to solve the DCP error. Disciplined convex programming error: Invalid quadratic form(s): not a square
How to express (1/x)*log(1+1/y)
Rewrite FIM to fullfill DCP rules
Transformation of a non-convex constraint
Really need your help
Is there any form to implement the matrix multiplied by its own conjugate transpose
How do I represent this equation in CVX?
How can I express 1 / norm()
Attempting to perform a biconvex optimization with quad_form
Help for BUG in the CVX optimization process:Linear Transformation of Convex Functions
Exponential of variables in the objective function
Disciplined convex programming error:CVX_real affine.*convex
How to solve {concave} .* {real affine}
Disciplined convex programming error: Illegal operation: {log-convex} - {log-convex}
How can i express this constraint using cvx?
Log( {complex affine} )
I am not sure how to solve error Invalid constraint: {convex} >= {real affine}
On using trace_inv function
How to express z<=x/y?
How to express it by using CVX? It is a SOCP problem (Moderator note: it is not an SOCP)
After Taylor approximation, the optimization function needs to optimize the variables each iteration
log-Concave + log-Concave Error
How do I implement the Laplace operator?
Power a square matrix
i'm getting Error using cvx_end Your objective function is not a scalar. errror
Invalid quadratic form(s): not a square (matlab)
How to write the following additions into MATLAB code that complies with the DCP rules, this problem has been bothering me for a long time, thank you very much for your advice
Invalid constraint: {concave} >= {concave}
Illegal operation: {concave} - {concave}
How to reformulate this in a CVX way: Cube over Square
CVX rel_entr use for different types of formulas
Can the following problem be solved using CVX?
I want to use CVX to formulate and solve the following problem
How can I solve this problem in CVX?
CVX rel_entr use for different types of formulas
Illegal operation: rel_entr( {convex}, {convex} )
Error using cvx
How to solve the problem by CVX?
Finding an optimal x of x^2*log(x) using cvx
Non-scalar quadratic forms with non-PSD and non-Hermitian coefficient matrices
How to express the function according to the legal form in CVX?
CVX variable U(N,N). How to make rank(U)=1?
(help)Error using CVX::Disciplined convex programming error: Invalid quadratic form(s): not a square
A colum vector is multiplied by its transpose
Disciplined convex programming error: Invalid constraint: {real affine} <= {log-convex} 出错
Dealing with multiple constraints
Problem with multiplication of two variables
How can I solve the problem? Cannot perform the operation: {real affine} .* {convex}
HOW CAN I solve the issue “Cannot perform the operation: {log-affine} .* {real affine} ”
Cannot perform the operation: {convex}/ {convex}
CVX error : {mix positive constant/complex affine} ./ {real affine}
How to use CVX in wireless communication,especially in long and complex expressions?
Non convex problem
Encounter error "Invalid quadratic form(s): not a square." when trying to multiply variables
Invalid computation: geo_mean( {mixed real affine/convex} )
Help!!!New person seeking help!
New person seeking help:Only scalar quadratic forms can be specified in CVX
Help: cvx codes about convex
Optimizing on an Identity Matrix and tracking the convergence
How to import a X= 1/v variables? (Tried inv_pos and ^(-1)
How to eliminate quadratic form of -log(det( X*A*X^T + B))
How do I invert a matrix with a cvx variable if I can't use the pinv function?
How to Define the Absolute function in the Constraint of SDP
How to Use CVX?
Optimization problem with integration
CVX error: Only scalar quadratic forms can be specified in CVX
Reciprocal of a variable:1/x
Greater than or equal to condition "modulus" in matlab
How to use cosine functions in cvx
Disciplined convex programming error: Cannot perform the operation norm( {convex}, 1 )
Cannot perform the operation: {convex} .* {real affine}
How can we write the following cost function in cvx?
How to solve the constraint "sqrt(x)(1+e^(-x)) >=c", where x >= 0,and c is a constant parameter
Illegal operation: {convex} - {convex}
Express -log(sum of the squared exponential) in cvx
Norm & Illegal operation: log( {convex} )
Non linear energy harvesting Does CVX support the following optimization problem?
Cannot perform the operation: {convex} ./ {convex} having summation of logs
My objective function is concave but i got "Disciplined convex programming error: Cannot perform the operation: {real affine} ./ {real affine}"
Common Lyapunov function - linear time-varying system
About rel_entr(positive, convex)
(Affine) matrix product of a variable Markov matrix with a positive variable vector
After using S-procedure, there existing quadratic term in the matrix
How to write inverse inside the log_det
Cannot perform the operation: {complex affine} .* {concave}
Optimal value is NaN, after 3th iteration of CVX
Log{convex} and rel_entr{convex}
HELP:Cannot perform the operation: {real affine} .* {convex}
HOW CAN I solve the issue
How I can tackle the error related to the Invalid constraint: {convex} >= {convex}?
Uav trajectory optimization using cvx
The error is "Cannot perform the operation: {real affine} .* {convex}"
{positive constant} ./ {convex}
Solution of basic inequality: [min((a+1)*(b+2))]Invalid quadratic form(s): not a square
A pow_pos function problem
How to express it?
Disciplined convex programming error: Invalid constraint: {convex} == {real affine}
Is x/log(1+x) concave? How can I use cvx solve the constraints " x/log(1+x) >= C", where C is constant
How to express sum(x^3+yz)<A in CVX
Is there an euqation like quad_over_lin, but for ||x||/y, x is a vector and y is a scalar number
How to solve this problem {real affine}.*{convex}
How to include binary norm constraint in CVX?
How to express this expression
I want to solve this SDP problem, but something wrong in my code
I need some help about equality constraints
How to use division in constraints
Pow_p( {convex}, {-1} )
Mad function erorr
How to write 0 <= U <= exp(-X*) * (1 - (X - X*))
(x*y)^2 1>x>0,1>y>0 How to convert it to concave function?
Express log(x/(1-x)) in cvx
Semidefinite matrix as a constraint
Concave Rational Function using DCP
Express xlog(1+1/y) in cvx
CVX cannot perform the operation: {positive constant} ./ {real affine}
How to solve this nonlinear optimization problem
How to solve this minimax problem via CVX?
Hi everyone , I have Error with CVX Matlab, could you please help me to fix this Error please
How to deal with the constraint
How to deal with an issue using Cvx!
Illegal operation: {concave} + {convex}
{convex} .* {complex affine}
Illegal operation: {convex} + {concave}
How can CVX solve the maximization problem "log(1-y/x)" with "x>0" and "y>0"
How to write constraint
Concave constraints
Invalid quadratic : not a square
How to express a non-convex constraint in CVX?
How to realize the product of known horizontal vector and unknown column vector
Matrix determinant minimization
How to express iterative expression?
Disciplined convex programming error: Illegal operation: log( {convex} )
Problem formualtion in CVX- MATLAB, where am I going wrong
Is the set defined by this inequality convex or not?
Disciplined convex programming error:the use of norm
Disciplined convex programming error Invalid quadratic form(s): not a square
How to use CVX in my problem?
Is this Problem Convex? if not, what should I change to make it convex
How to solve this problem?Cannot perform the operation: {real affine} .* {convex}
How can I solve this problem? Disciplined convex programming error: Cannot perform the operation: {real affine} ./ {real affine}
How to solve this problem?Cannot perform the operation: {real affine} .* {convex}
Cannot perform the operation: {convex} .* {convex}
When I use pow_ This error occurs when the POS function is. What's going on?
How i can fix the problem
How to solve this error
How to use >= constraint?
Is there anyway to represent this expression in cvx?
''Disciplined convex programming error: Illegal operation: exp( {affine} ).''
How to solve such a problem :Cannot perform the operation: {convex} .* {convex}
Underdetermined inequality constraint detected?
Error in ./ (line 19) z = times( x, y, './' );
How to solve the problem?
Help log,how to express it?
About matrix normalization, Cannot perform the operation: {convex} ./ {convex}
Constraint on Left Inverse of a Matrix in a Binary Finite Field
How do I multiply two variables in CVX?
Cannot perform the operation: {real affine} .* {concave}, but the considered problem is a convex optimization problem
Invalid constraint: {real affine} == {convex}
Illegal operation: {convex} + {complex affine} error
Can someone suggest the way to convexify the problem 1/x^2, where x is the decision variable (Mod note: nonconvexity is for non-scalar version of this)
Error: Cannot perform the operation: {real affine} ./ {real affine}
GP programming formulation
Why is the error reported {convex} .* {real affine}
Cvx formulation
Conversion from double to cvx
Log convex error
Equality constraint exp(x)+exp(y)+exp(z)==1 cannot work
Error Disciplined convex programming error
Mandatory requirements for all attempts on convex problems
Problem about rel_entr
About the convexity of function
Illegal addition
Use the cvx convex optimization method to solve this simple trajectory optimization problem in the figure.
Product of two convex functions
How to deal with the erf function in optimization problem?
How to express x/(1+exp(-y))
How to supply non-singularity constraint?
For convex function: Disciplined convex programming error: Cannot perform the operation: {real affine} .* {convex}
Cannot perform the operation: {concave} .* {concave}
错误使用 .* (line 262) Disciplined convex programming error: Invalid quadratic form(s): not a square
How to express it in CVX?
How to minimize this convex function?
How to solve this problem?
An error :Invalid quadratic form(s): not a square
Can anyone help me?
Help me!How can I solve this problem using CVX
Cvx DCP error:positive constant./convex
Only scalar quadratic forms can be specified in CVX_?
Illegal operation: {convex} .^ {0.5}
Why the code doesn't work?
Wish List: Allow Limited DCP Non-Compliance as Front End for Non-Convex Solvers
How can I solve this max min nonconvex problem using CVX?
How can I solve this max min problem using CVX?
Convex programming error
Can we easily find peaks in CVX? Thanks
Cannot perform the operation: {concave} ./ {real affine}
Fractional Programming in cvx
How to express this problem in CVX
How to solve the error : sqrt( {convex}
I appropriate any help,thanks
Error from using rotated_lorentz: why is it concave?
Cvx errors when coding the beamforming vector
Minimize log(1+1/x) where 0<x<inf
Two convex problems one inside the other
Help! How to express log_det(I-w*w') >=A in CVX, where w is a matrix variable
Function “atan” supported in CVX?
Invalid constraint: {constant} <= {convex}
Invalid computation: min( {convex} )
Invalid constraint: {convex} <= {convex}
How to solve the exponent
How to transform a*x/(b*x-c) (convex function) in the CVX?
Cannot perform the operation: {mixed real affine/complex affine} ./ {real affine}
Why am I getting this error?
How does the subtraction of two log functions conform to the DCP rule?
Why am I getting this error?
DCP Rule set error
F(x,y)=xy is convex or concave?
Help what should i do ,about convex*real affine or concave*real affine
Convex programming
Help Illegal operation: pow_p( {convex}, {-1} )
CVX: Illegal operation: pow_p( {convex}, {-1} )?
How to realize the multiplication of a optimization variable in CVX? Or is there another way(not restricted to CVX) to realize it?
Can I use CVX to solve a minimax optimization problem?
How to constrain a element of variable
Outer product error :Disciplined convex programming error: Invalid quadratic form(s): not a square
Always remind me the Illegal operation: log( {convex} )
Disciplined convex programming error: Cannot perform the operation: {convex} .* {real affine}
How can I solve this optimization problem using cvx
DCP error: Only scalar quadratic forms can be specified in CVX 2
Conversion of “sine function to convex form
Cannot perform the operation: {negative constant} .* {convex}
Disciplined convex programming error: Invalid operation: {positive convex} ./ {real affine}
Convex - Convex error using CVX
Disciplined convex programming error:Cannot perform the operation: {real affine} ./ {real affine}
The following cvx variable(s) have been cleared or overwritten: x_u y_u
Cannot perform the operation: {log-affine} ./ {concave}
Exp of negative cvx variable multiplied by cvx variable
How to solve a constrained optimization problem of the form R<log(1+q2^2/q1^2)
About division in constraints
PCA problem occurs error:“Only scalar quadratic forms can be specified in CVX”
Illegal operation: pow_p( {convex}, {-1} )
How can I express 'a+trace(A*A^H*X)' in cvx?
Disciplined convex programming error:Only scalar quadratic forms can be specified in CVX. How to add additional constraint
How can I formulate this in CVX
Disciplined convex programming error: Cannot perform the operation: {real affine} .* {convex}"
How to compute the restricted isometry constant of an observation matrix in the CS framework by using CVX?
How do I write a complicated objective function in cvx
How to solve Cannot perform the operation: {concave} .* {convex}
How To express log(1+(x/(1+y)))
Error using cvx/pow_cvx (line 144) Disciplined convex programming error: Illegal operation: pow_p( {convex}, {-1} )
Complex {positive constant} ./ {complex affine}
How can I express log2(1+S(1)/(S(2)+N)) in problem?
A problem of 'log' in objective function
Error using cvx/pow_cvx (line 144) Disciplined convex programming error: Illegal operation: pow_p( {convex}, {-1} ) Error in cvx/inv_pos (line 5) y = pow_cvx( x, -1, 'pow_p' );
How to implement this constraint in CVX?
Cvx DCP error:affine.*convex
Normalizing the variable
How to give conditions on transformations of variables?
{convex} - {convex} error
Solving a LMI problem With CVX (Moderator Note: LMIs are convex, but this is not an LMI)
Cannot perform the operation: {complex affine} .* {convex}
How to solve optimization problem
ERROR:Disciplined convex programming error: Only scalar quadratic forms can be specified in CVX
My code is shown as shown. But it shows error 'inv'. But when I delete 'inv', it also shows error. Please help me, thanks
How to do it with CVX
Code error, ask for directions
Disciplined convex programming error:Exponential multiplication
Rel_entr constraint
Error: Illegal operation: {convex} + {concave}
Is there any way to solve the nonconvex problem caused by root sign in constraint conditions?
The problem of constraint expression with norm in CVX
Dİvision error / Disciplined convex programming error: Cannot perform the operation: {real affine} ./ {real affine}
Can SVD be used as a constraint?
I list my codes, could you please help me figure out the problems? Thanks
HELP, How to effectively use CVX to complete the description of this function
How can I solve this complex optimization by cvx solver?
Error: Only scalar quadratic forms can be specified in CVX
Only scalar quadratic forms can be specified in CVX :minimize ((norm(- b + A*z )))
Cannot perform the operation: {convex} .* {log-affine}
Cvx maximization problem
Normalizing Vector
Only scalar quadratic forms can be specified in CVX
CVX warning: Too many output arguments
What's the valid form of Trace(ab)*Trace(ac)
CVX: Illegal operation: pow_p( {convex}, {-1} )?
How to make x/norm([x a]) feasible?
BPDN l0-norm approximation
Model sigmoid function as convex optimisation with logical constraint
Non-convexity while using Charens and Cooper transformation in the problem
Invalid quadratic form(s): not a square
My function is concave: Cannot perform the operation: {real affine} .* {convex}
Is there anyway to specify that the solution to a convex optimization problem must be a white noise?
Cannot perform the operation: {real affine} ./ {real affine} error on cvx matlab
Disciplined convex programming error: Cannot perform the operation: {real affine} .* {log-affine}
Inv_pos(norm..)
Weight minimization of a speed reducer
Disciplined convex programming error:Only scalar quadratic forms can be specified in CVX
Cannot perform the operation: {real affine} .* {concave}
Please help me! How to convert this problem to cvx form
Please help me out with this problem
How to convert this problem to cvx form
Cvx error. I have search for one day but find nothing. I don't known where I'm wrong. I hope someone can help me!
Low rank PSD matrix approximation in SDP mode
Cvx maximization problem
How to express $\frac{r}{r^3}$
Using fit model in CVX programming
How can I express that this matrix is semi-positive definite? [[G,g'];[g,1]] == semidefinite(7);
Help with log det expression
I am not able to solve this
Disciplined convex programming error: Cannot perform the operation: {positive constant} ./ {real affine}
Disciplined convex programming error: Invalid constraint: {convex} >= {convex}
Invalid operation: {1e+06} / {positive convex}
Disciplined convex programming error: invalid quadratic form: must be a scalar
CVX conform way of problem
Disciplined convex programming error help
Rayleigh quotient optimization
SDP constraints must be affine
ERROR Not a square but I find the Usage is same as some examples
Invalid quadratic form(s): not a square
Disciplined convex programming error: Cannot perform the operation: {real affine} ./ {real affine}
Disciplined convex programming error: Cannot perform the operation: {concave} .* {log-affine}
Invalid quadratic form
Spectral radius of asymmetric matrices
Need some help with my code
How to handle c*x/((x+a)*(x+b))
I need some help with my code
How to write this positive semidefinite constraint into CVX?
Quadratic nonconvex inequality constraint
Shannon Capacity formula (Disciplined convex programming error)
How to transform this objective function under CVX DCP rules?
Matlab OUT OF MEMORY error on optimization problem
{convex}*{real affine}
How to solve the error Only scalar quadratic forms can be specified in CVX
Convex or nonconvex problem
Solving maximize( quad_form(x,P)) ) subject to norm(x,2)<=N
Cannot perform the operation norm( {convex}, 2 )
Algebraic Riccati Equation in cvx
DCP-compliant way to scale by sum(x)?
Can I write this ( xy + xz +yz <1 ) as a SOCP?
How can i solve this problem by CVX?
Ask for a help about the cvx's error
How to minimize following function in CVX form
Error : {invalid} .* {convex}
Question about defining formula in the cvx
Cannot perform the operation {convex}*{affine} and Only scalar quadratic forms can be specified in CVX
Invalid quadratic forms: not a square
Simple quadratic sequence makes Invalid quadratic form(s): not a square. error
Illegal operation: {complex constant} - {convex}
Maximizing linear function over convex set
Disciplined convex programming:
Norm of non-separable bilinear term
How can I solve log(normalcdf(a-x)-normalcdf(b-x)) with cvx
Solving Reciprocal of Concave
CVX error in using pow_cvx
Illegal operation: log( {convex} )
About function of log,can't solve
Invalid quadratic form(s): not a square error
Error using .* (line 262) Disciplined convex programming error: Invalid quadratic form(s): not a square
Can anyone help me with this problem?
Is there any form to implement the matrix multiplied by its own conjugate transpose
Why isn't cvx accepting $log(x^t*A*x)$, where A is positive definite?
Why does CVX accept log(2^exp(x)) but don't accept log(2^exp(x)-1)
Cannot perform the operation: {concave} ./ {concave}
DCP error:Illegal operation: {log-affine} + {concave}
How to solve "Cannot perform the operation: {convex} .* {real affine}"
How to express x*log(y)
How to express x(1)^2+x(2)^2=y^2?
Quasiconcave: {CONCAVE}.^2
log(det(A+Y)/det(Y)) constraint?
Formulating the max min problem in CVX with concave square dinside
Supporting vectors of a matrix
How to fix the constraint
How to write an optimization problem in cvx
Sum of sigmoid function and linear function
Cannot perform the operation: {real affine} .* {log-affine} in CVX
Disciplined convex programming error: Matrix powers not permitted
How to write this expression in cvx?
Division used in cvx
How should I describe this problem in CVX?
Illegal operation: abs( {concave} )
How can I solve this problem by cvx solver?
CVX Invalid quadratic form(s): not a square
Error while solving OP with constraint
How to express this concave function in cvx?
Constraint error
How to discribe integral ,including parameter,in a function
Minimizing the norm of an expression containing a hermitian matrix to some power
Why does CVX give this error for my model?
How to solve Disciplined convex programming error: Illegal operation: exp( {affine} )
How could I solve this problem?
How to use inv(x) functions in constrain?
Invalid quadratic form: must be a scalar
How can i model x^3/x^2>=-2 constraint in cvx?
Can CVX solve the equivalent Lagrangian dual of a convex optimization problem?
How to solve a [non-]convex problem with multiple scalar and matrix variables
HELP! How to solve vector prod in CVX
How can I use CVX to solve the following fractional quadratic problem?
I have tried to solve the following problem. But CVX wouldnt accept the norm constraint
Unable to use sort function inside CVX
Least mean square optimimization with a constraint
Gaussian Mixture Model in CVX
Non-Convex fractional quadratic optimization
Network rate optimization
Need help with formularizing a problem with matrix quadratic form
How can I model the optimization problem in CVX?
Convexity and DCP error
Cannot perform the operation: {convex} .* {positive constant}
How to solve the coupling issue of two optimization variables in CVX?
Is there a CVX formulation for x+1/y?
How to write this QP in CVX form
Getting concave function accepted by CVX
如何解决sqrt(1/norm)?
Signal processing linear program (Moderator note: this is not a Linear Program)
Hadamard product of a quadratic form
Disciplined convex programming error: Cannot maximize a(n) convex expression
CVX for minimizing abs of norm
A non-convex problem with a non-convex quartic constraint and a convex function as the objective
Disciplined convex programming error Invalid quadratic form(s): not a square..//
Illegal operation: {log-concave} - {real constant}
How to write trace(inverse(X)*inverse(X)) in the objective function?
How to define the following function in correct DCP format?
How to solve this problem?Disciplined convex programming error: Cannot perform the operation: {convex} .* {real affine}
How do I rewrite the problem,so CVX can be used to solve it?
Disciplined convex programming error: Cannot perform the operation: {real affine} ./ {convex} What should I do about it
Need Help with Convex Reformulation for Matrix Product in CVX Optimization
How can I transform this problem into a convex optimization problem?
How to express an expression as a valid CVX-compatible function
How can this objective can be linearized?
How can CVX maximize -sum_(i,j) x(i,j)*log(sum_j x(i,j))?
Disciplined convex programming error
Multiplying two variables
How to formulate the eigenvalue maximization problem in CVX
Linear fraction with SDP
Comparison on variables
Constraints
How do we solve it? Cannot maximize a(n) convex expression
Does this problem is a SDP? How to solve it?
Help to formulate
How to solve an optimization problem with non-convex constraint
Log matrix cvx
How to formulate this optimization problem
Error using double Conversion to double from cvx is not possible
Convex function or not?
Convex constraint rejected
Transmit Beampattern (Beamforming)
Cannot perform the operation norm( {mixed convex/affine}, 2 )
How to express `minimize $trace(\sqrt{X'X}A)$` by CVX?
How to express this objective function in CVX
How to express this objective function in CVX
Invalid operation error: log ({positive convex})
Constraints not accepted by the solver
Linearizing nonlinear mixed-integer constraint
Using fminsearch inside a cvx model