I had Posted a question yesterday But I don’t know if I had written it correctly. I want to formulate the following problem in CVX

Find p(k), W(k) to

```
Minimize ∑(over k) W
```

S.T;

```
W(k)*(B/N) * log(1 + ((p(k)*H(k)/W(k)*(S^2))) > = r(k);
∑ over k p(k) < = pmax;
p(k) > = 0;
W(k) > = 0 for all K;
```

Where H(k), r(k), N, B are variables…

I have written the following CVK code but it is not accepting it…PLEASE HELP ME!!

```
variables w(k) p(k) b(k);
```

`minimize sum(w);`

```
subject to
```

for i = 1:k,

```
log(w(i)*square(S) + p(i)*H(i)) - log(w(i)*square(s))
>= r(i)*N*inv_pos(w(i)*B)
p(i)>=0;
w(i)>=0;
end
sum(p)<=pmax;
```

cvx_end;

In the first constraint it says that both the terms are concave… I dont know what to do…plz help!!