cvx_begin
variable x
maximize -(1-x)*exp(-x) %目标函数
cvx_end
%%%%%%%%%%%%%
The objective function is concave, why are there so many errors?
错误使用 .* (line 173)
Disciplined convex programming error:
Cannot perform the operation: {real affine} .* {log-affine}
出错 * (line 36)
z = feval( oper, x, y );
出错 maximize (line 14)
x = evalin( ‘caller’, sprintf( '%s ', varargin{:} ) );
出错 shiyan (line 46)
maximize -x*exp(-x) %目标函数