Hi Everybody,

May I ask you, why CVX gives these errors for my model?

Error in ./ (line 19)

z = times( x, y, ‘./’ );

Error in maximize (line 14)

x = evalin( ‘caller’, sprintf( '%s ', varargin{:} ) );

Thanks for your help and time in advance.

Hi Everybody,

May I ask you, why CVX gives these errors for my model?

Error in ./ (line 19)

z = times( x, y, ‘./’ );

Error in maximize (line 14)

x = evalin( ‘caller’, sprintf( '%s ', varargin{:} ) );

Thanks for your help and time in advance.

You haven’t offered enough context for anyone to help you. At the very least, you should be giving us the *full* text of the error message, and as much context from your model code so we can see exactly where the error is occurring.

Thanks for your reply. My model is:

```
N=4;
Varience=5*1e-6;
Ith=1e-4;
Ps1=0.03;
Pr=0.03;
HSR1=[0.09,0.06,0.14,0.03];
HSR2=[0.14,0.7,0.05,0.01];
HRD1=[0.2,0.1,0.2,0.01];
HRD2=[0.05,0.1,0.3,0.18];
GS1=[0.0014,0.0031,0.0012,0.007];
GR1=[0.0018,0.01,0.6e-04,1e-05];
cvx_begin
clear power_Final
variables power_Final(1,N)
maximize sum(0.5*log(1+(((power_Final.*power_Final).*HSR2.*HRD1)./(Varience.*(power_Final.*HRD1+power_Final.*HSR1+power_Final.*HSR2+Varience))))+...
0.5*log(1+(((power_Final.*power_Final).*HSR1.*HRD2)./(Varience.*(power_Final.*HRD2+power_Final.*HSR1+power_Final.*HSR2+nVarience)))));
subject to
power_Final*1000 >= 0;
sum(power_Final.*GS1)<=Ith;
sum(power_final.*(GS1+GS2))<=Ith
cvx_end
```