Thank you, I tried the following:
n=10;
A = randi([1 10],1,n);
cvx_begin
variable x(1,n) nonnegative
minimize(A.*inv_pos(x));
subject to
sum(x)>=1;
cvx_end
I get the following error as:
Error using class
Cannot change the number of fields of class ‘cvxtuple’ without first typing ‘clear classes’.
Error in cvxtuple (line 19)
v = class( struct( ‘value_’, { v }, ‘dual_’, { [] } ), ‘cvxtuple’, cvxobj );
Error in cvx_end (line 185)
assignin( ‘caller’, ‘cvx_optpnt’, cvxtuple( cvx_collapse( vars, false, false ) ) );
Error in geo_mean_cone (line 355)
cvx_end
Error in cvx/pow_cvx (line 158)
{ cat( nd, cvx_accept_concave(xt), yt ), 1 } == geo_mean_cone( sw, nd, [-pt,1], ‘func’ ); %#ok
Error in cvx/inv_pos (line 5)
y = pow_cvx( x, -1, ‘pow_p’ );
Error in test (line 8)
minimize(A.*inv_pos(x));