why I don’t get the optimum point?
variable b(p, p)
You specified an infeasible problem, which was reported as such by CVX.
Inside the for loop.
constrains every element of b to =1 (a row vector at a time); and
constrains all column sums of b to be <= 1. So this is of course infeasible given that b has more than one row.
I think what you want is, with no for loop,
sum(b,2) == 1
sum(b,1) <= 1
sum(b,1) == 1
sum(b,2) <= 1
I’ll let you figure out which is correct.
On the problem you provided, both versions had the solution
b = 1/3*ones(3).
Given that you have no semidefinite constraints, you can avoid a potential source of error by not using the sdp option with cvx_begin.
Thanks for your help. But is it meaningful that optimum solution is the same?
I believe that occurs because your c and alpha values are scalars, making the problem invariant to transposition of b. That invariance may not hold for general c and alpha, as in the image.