How to formulate block sparsity?

Hello,

I am new to CVX, and trying to formulate block-sparsity. in the code. I want to find a vector r of length M. The vector r is an N-block-sparse vector consisting of segments r1, r2, …, rN of lengths d1, d2, …, dN, respectively.

The objective that I want to minimize is ||r1||_2 + ||r2||_2 + … + ||rN||_2
I am not sure how to write this objective in CVX while also putting the condition that r1, r2 etc. are parts of r.
Any help or hints will be greatly appreciated.

-ryan

Here’s a useful exercise: suppose you were given a numeric vector r, and you needed some code to compute that norm on that numeric vector. How would you do it? It’s quite likely that is exactly how you would do it in CVX.