What is possible way to incorporate if-else inside CVX


if a+b>=c
% do something, e.g., z = a

where z is objective variable, a and b are the CVX variables, and c is a constant.

Do Big M modeling, along the lines of https://math.stackexchange.com/questions/2500415/how-to-write-if-else-statement-in-linear-programming/2501007 . There are many other example on the internet.

This makes use of CVX;s MIDCP capability (requires Gurobi, Mosek, or if you can get it to work, GLPK).

Ok, I will check this this link.