No, this is not convex, and cannot be made to be. What exactly are you trying to accomplish here? (Express it mathematically/in English, not with CVX code.) There’s a chance this may be mixed-integer representable but I don’t quite see what’s going on.
Thanks for your comment - I am trying to solve an optimization problem while constraining the solution to have one turning point, either one of the following shape \______/ or / . In the code, I am trying to constrain the sign of its derivative which obviously didn’t work.