Invalid operation error: log ({positive convex})

My objective is l1-norm minimization in another domain using total variation norm matrix D.

cvx_begin

cvx_solver ecos
variable h_hat(N) complex
minimize norm(D * log(abs(h_hat).^2),1)
subject to
Dic * h_hat==R;

cvx_end

CVX gives invalid operation error: log({positive convex})

When I remove log from the objective,

cvx_begin
cvx_solver ecos
variable h_hat(N) complex
minimize norm(D * (abs(h_hat).^2),1)
subject to
Dic * h_hat==R;

cvx_end

I still receive invalid operation error but this time “Invalid operation: * {mixed negative constant/zero/positive constant matrix}”.

I would be grateful if someone can help me out and explain what I am doing wrong and if possible, write in correct CVX expression?

help cvx/norm --> norm is nonmonotonic, so its input must be affine. help cvx/log --> log(X) is concave and nondecreasing in X. When used in CVX expressions, X must be concave. Also, read FAQ: Why doesn’t CVX accept my problem? [READ THIS FIRST]

can you please explain why I can’t multiply a matrix with absolute value of an unknown variable in a norm expression? Is it not an affine expression or due to being monotonic? I know that it is my responsibility to ensure my problem is convex but I cannot understand the constant matrix error. Thanks

Because norm is nonmonotonic, its input must be affine. Your input (argument of norm) is not affine, and the resulting norm is nonconvex.

I agree the second error message is cryptic. Handling error messages correctly is one of the harder things to do in software like this, because of course you’re having to anticipate all the wrong ways people use your software. That said, you are simply not heeding the FAQ. You need to read it.