Express (||x-a||-b)^2 in cvx

Hello.
I currenly have an onjective: (||x-a||-b)^2.
It is a fucntion of variable x and x is a vector.
Is there a way to express this function in cvx?
Thanks.

this is neither convex nor concave. see a special case (|x|-1)^2. so it can’t be done.

What if I change ||x-a|| to sqrt( (x-a)^2+(y-c)^2 ). The expresion here becomes ( sqrt( (x-a)^2+(y-c)^2 ) -b )^2, which I think is a convex function w.r.t. x and y.
Thanks.

That’s doesn’t change the (non-convexity). It just adds yet another DCP violation.