That looks o.k. other than I don’'t know why you don’t have the +1 in floor(log2(C(j))+1); But that’s not a CVX matter.
All elements of CVX expression holders are initialized to zero, which is a behavior your code relies on.
Try inputting numerical values of G instead of declaring it a variable, using `b4=zeros(5,1) instead of expression, and verify it evaluates to what you want.