Hello,

I have 2 problems I wish to solve in CVX.

Solve x that minimizes my objective function, matrix A and vector b are known.

My attempt for 1st objective function

variable x( size(A,2) );

minimize ( (b - A*x)’*(b - A*x) + lambda * x’ * x );

My attempt for 2nd objective function

variable x( size(A,2) );

minimize ( (b - A*x)’*(b - A*x) + lambda * norm(x,1) );

Are these correct? Is there any better way to write them in CVX?