Hi,
I have a scalar that is convex and real, lets say “x”.
when trying to multiply it with -1jx I get the following error:
Disciplined convex programming error:
Cannot perform the operation: {complex affine} . {convex}
Now although some may argue that -1j is in fact a affine function, I should note that multiplying x by real scalar is fine.
Am I missing something?
http://cvxr.com/cvx/doc/dcp.html#expression-rules
- A valid convex expression is
- a valid constant or affine expression;
- a valid call to a function in the atom library with a convex result;
- an affine scalar raised to a constant power p≥1
, p≠3,5,7,9,…* * ;
- a convex scalar quadratic form—see Scalar quadratic forms ;
- the sum of two or more convex expressions;
- the difference between a convex expression and a concave expression;
- the product of a convex expression and a nonnegative constant;
- the product of a concave expression and a nonpositive constant;
- the negation of a concave expression.
- A valid concave expression is
- a valid constant or affine expression;
- a valid call to a function in the atom library with a concave result;
- a concave scalar raised to a power p∈(0,1)
- ;
- a concave scalar quadratic form—see Scalar quadratic forms ;
- the sum of two or more concave expressions;
- the difference between a concave expression and a convex expression;
- the product of a concave expression and a nonnegative constant;
- the product of a convex expression and a nonpositive constant;
- the negation of a convex expression.
You will not see in these lists a provision for multiplying a convex expression by an imaginary or complex number. Hence your error message.
Let x be a CVX variable. Consider the convex expression x^2. Then consider the expression 2*x^2; that is also convex. What is the convexity of 1j*x^2 or -1j*x^2 ; they are neither convex nor concave, so CVX will not allow them.
Thanks for the explantion!
I do wonder though, is it possible in cvx framework to fft a convex variable? Say if the sparse condition is in the dual transform.