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.

Error in cvx_pop (line 29)

s2 = cellfun( @cvx_id, s2 );

Error in cvx_end (line 15)

evalin( ‘caller’, ‘cvx_pop’ );

Error in test_1 (line 84)

cvx_end

However, the problem is solved, but there is still wrong…Can someone help me?