My program is

clear;

clc;

cvx_begin

variables x(2)

minimize inv_pos(x(1)) + inv_pos(x(2)) + prod_inv(x)

subject to

1<=x(1)<=10;

1<=x(2)<=10;

cvx_end

But the error occurs

Undefined function or variable ‘n’

cvx/prod_inv (line 37)

geo_mean( cat( dim, x, y ), dim, [ ones(n,1) ; p ] ) >= 1; %#ok

minimize (line 14)

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

cvx_test (line 5)

minimize inv_pos(x(1)) + inv_pos(x(2)) + prod_inv(x)"

So how can I use prod_inv(x) correctly?