0th norm in cvx or number of non-zero elements

(Haider Abbas) #1

I have a condition says 0th norm = no. of non-zero elements of w = 5
how I can implement it in cvx?

(Mark L. Stone) #2

You’ll have to use the mixed integer DCP (MIDCP) capability of CVX, if it can be done. It may require some effort on your part, which will depend on the context.