January 28, 2021, 5:21pm
There is a inverse tangent function in my constraint. Actually, I use the Matlab built-in function “atan”. The expression of this constraint is:
x - atan(y) <= 0,
where x and y are scalar variable, and y>=0.
However, an error appears:
Undefined function ‘atan’ for input arguments of type ‘cvx’.
Does this mean function “atan” is not supported in CVX？
`atan is neither convex nor concave, so not supported by CVX.
January 28, 2021, 6:47pm
Thank you Mark. In my case, y>=0, so -atan(y) is convex in this domain of definition. And the constraint x-atan(y) is a convex set.
Is there anything I can do to make this constraint accepted by CVX? (Maybe something like the CVX build-in function “square_pos”?)
January 29, 2021, 2:07pm
Thank you! This is helpful. I decide to try successive approximation.
By the way, in the future, will CVX include features to deal with function like arctan and tan? Maybe:
add built-in function, e.g., “atan_pos”?
include built-in successive approximation for arctan like what have been done for
I doubt any of that will ever be added to CVX, which is not in a very active state of development (I am not the developer).
January 29, 2021, 2:13pm
OK, I see. Thanks for reply!
November 18, 2021, 1:12pm
Hello, I also encountered the same problem, but I don’t know how to make continuous approximation of this atan function. How do you solve it? Looking forward to your reply
The way you “solve it” is to to use some tool other than CVX. For instance, YALMIP, which allows non-convexities and has support for
atan (and also supports atan2 in its develop branch
November 18, 2021, 3:14pm
Thank you! This is helpful. I will try it.