I try to use the cvx to solve a convex problem, and here is my code:

cvx_begin
variable R(total_v,2)
F=0;
for eth=1:total_e
i=1;
for vth=1:total_v
for lth=1:2
u(i)=R(vth,lth)*lamda(vth)*bm*p_miss(x(vth))*I_lve(vth,lth,eth)/de(eth);
i=i+1;
end
end
f(eth)=3*pow_p(sum(u),3);
end
F=sum(f);
minimize(F)
subject to
for i=1:total_v
for j=1:2
R(i,j)>=0
R(i,j)<=1
end
end
for i=1:total_v
sum(R(i,:))==1
end
cvx_end

After running, here is the message the cvx give:

Status: Solved
Optimal value (cvx_optval): +2.69825

Error using cellfun
Non-scalar in Uniform output, at index 27, output 1.
Set ‘UniformOutput’ to false.

Do not use CVX 3.0beta. It is riddled with bugs. Remove all of 3.0beta from MATLAB path then install 2.2 in a fresh session of MATLAB. Download 2.2 at http://cvxr.com/cvx/download/ .